Ticket #437: printk-format.diff

File printk-format.diff, 4.8 KB (added by strauman, on 12/03/06 at 13:31:12)

printk-format.diff

Line 
1This patch against rtems-4.6.0pre4 addresses the following issue:
2
3        - bspIo/printk must not use '%i' format; replaced by '%d'
4   
5       
6Index: rtems/src-20030128/c/src/lib/libbsp/powerpc/shared/irq/irq.c
7diff -c rtems/src-20030128/c/src/lib/libbsp/powerpc/shared/irq/irq.c:1.12 rtems/src-20030128/c/src/lib/libbsp/powerpc/shared/irq/irq.c:1.13
8*** rtems/src-20030128/c/src/lib/libbsp/powerpc/shared/irq/irq.c:1.12   Mon Jul 14 20:42:18 2003
9--- rtems/src-20030128/c/src/lib/libbsp/powerpc/shared/irq/irq.c        Tue Jul 22 15:48:39 2003
10***************
11*** 128,138 ****
12      rtems_irq_connect_data* vchain;
13   
14      if (!isValidInterrupt(irq->name)) {
15!       printk("Invalid interrupt vector %i\n",irq->name);
16        return 0;
17      }
18      if ( (int)rtems_hdl_tbl[irq->name].next_handler  == -1 ) {
19!       printk("IRQ vector %i already connected to an unshared handler\n",irq->name);
20        return 0;
21      }
22      _CPU_ISR_Disable(level);
23--- 128,138 ----
24      rtems_irq_connect_data* vchain;
25   
26      if (!isValidInterrupt(irq->name)) {
27!       printk("Invalid interrupt vector %d\n",irq->name);
28        return 0;
29      }
30      if ( (int)rtems_hdl_tbl[irq->name].next_handler  == -1 ) {
31!       printk("IRQ vector %d already connected to an unshared handler\n",irq->name);
32        return 0;
33      }
34      _CPU_ISR_Disable(level);
35***************
36*** 191,197 ****
37      unsigned int level;
38   
39      if (!isValidInterrupt(irq->name)) {
40!       printk("Invalid interrupt vector %i\n",irq->name);
41        return 0;
42      }
43      /*
44--- 191,197 ----
45      unsigned int level;
46   
47      if (!isValidInterrupt(irq->name)) {
48!       printk("Invalid interrupt vector %d\n",irq->name);
49        return 0;
50      }
51      /*
52***************
53*** 202,208 ****
54       * to get the previous handler before accepting to disconnect.
55       */
56      if (rtems_hdl_tbl[irq->name].hdl != default_rtems_entry.hdl) {
57!       printk("IRQ vector %i already connected\n",irq->name);
58        return 0;
59      }
60      _CPU_ISR_Disable(level);
61--- 202,208 ----
62       * to get the previous handler before accepting to disconnect.
63       */
64      if (rtems_hdl_tbl[irq->name].hdl != default_rtems_entry.hdl) {
65!       printk("IRQ vector %d already connected\n",irq->name);
66        return 0;
67      }
68      _CPU_ISR_Disable(level);
69Index: rtems/src-20030128/c/src/lib/libbsp/powerpc/shared/pci/pci.c
70diff -c rtems/src-20030128/c/src/lib/libbsp/powerpc/shared/pci/pci.c:1.8 rtems/src-20030128/c/src/lib/libbsp/powerpc/shared/pci/pci.c:1.9
71*** rtems/src-20030128/c/src/lib/libbsp/powerpc/shared/pci/pci.c:1.8    Mon Jul 14 20:42:22 2003
72--- rtems/src-20030128/c/src/lib/libbsp/powerpc/shared/pci/pci.c        Tue Jul 22 18:04:37 2003
73***************
74*** 21,26 ****
75--- 21,27 ----
76 
77  #include <libcpu/io.h>
78  #include <bsp/pci.h>
79+ #include <rtems/bspIo.h>
80 
81  /* allow for overriding these definitions */
82  #ifndef PCI_CONFIG_ADDR
83***************
84*** 388,394 ****
85                       }
86                       if( int_name == -1 )
87                       {
88!                         printk("pci : Unable to resolve device %d:%d w/ swizzled int pin %i to an interrupt_line.\n", pbus, pslot, int_pin );
89                       }
90                       else
91                       {
92--- 389,395 ----
93                       }
94                       if( int_name == -1 )
95                       {
96!                         printk("pci : Unable to resolve device %d:%d w/ swizzled int pin %d to an interrupt_line.\n", pbus, pslot, int_pin );
97                       }
98                       else
99                       {
100***************
101*** 458,464 ****
102                             }
103                             if( int_name == -1 )
104                             {
105!                               printk("pci : Unable to resolve device %d:%d w/ swizzled int pin %i to an interrupt_line.\n", pbus, pslot, int_pin );
106                             }
107                             else
108                             {
109--- 459,465 ----
110                             }
111                             if( int_name == -1 )
112                             {
113!                               printk("pci : Unable to resolve device %d:%d w/ swizzled int pin %d to an interrupt_line.\n", pbus, pslot, int_pin );
114                             }
115                             else
116                             {
117***************
118*** 499,505 ****
119                       }
120                       else
121                       {
122!                         printk("pci : No bridge from bus %i towards root found\n", tbus );
123                          goto donesearch;
124                       }
125                       
126--- 500,506 ----
127                       }
128                       else
129                       {
130!                         printk("pci : No bridge from bus %d towards root found\n", tbus );
131                          goto donesearch;
132                       }
133