fix brcm-2.4 target profiles
[openwrt.git] / target / linux / generic-2.4 / patches / 007-more_gcc4_fixes.patch
1 diff -rupN linux-2.4.32/drivers/atm/fore200e.c linux-2.4.32.more-gcc4-fixes-v1/drivers/atm/fore200e.c
2 --- linux-2.4.32/drivers/atm/fore200e.c 2004-11-17 18:36:41.000000000 +0100
3 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/atm/fore200e.c      2005-11-17 13:31:16.000000000 +0100
4 @@ -112,8 +112,8 @@
5  #endif
6  
7  
8 -extern const struct atmdev_ops   fore200e_ops;
9 -extern const struct fore200e_bus fore200e_bus[];
10 +static const struct atmdev_ops   fore200e_ops;
11 +static const struct fore200e_bus fore200e_bus[];
12  
13  static struct fore200e* fore200e_boards = NULL;
14  
15 diff -rupN linux-2.4.32/drivers/atm/horizon.c linux-2.4.32.more-gcc4-fixes-v1/drivers/atm/horizon.c
16 --- linux-2.4.32/drivers/atm/horizon.c  2004-02-18 15:16:22.000000000 +0100
17 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/atm/horizon.c       2005-11-17 13:31:16.000000000 +0100
18 @@ -481,6 +481,7 @@ static inline void dump_skb (char * pref
19    return;
20  }
21  
22 +#if 0 /* unused and in conflict with <asm-ppc/system.h> */
23  static inline void dump_regs (hrz_dev * dev) {
24  #ifdef DEBUG_HORIZON
25    PRINTD (DBG_REGS, "CONTROL 0: %#x", rd_regl (dev, CONTROL_0_REG));
26 @@ -494,6 +495,7 @@ static inline void dump_regs (hrz_dev * 
27  #endif
28    return;
29  }
30 +#endif
31  
32  static inline void dump_framer (hrz_dev * dev) {
33  #ifdef DEBUG_HORIZON
34 diff -rupN linux-2.4.32/drivers/atm/iphase.c linux-2.4.32.more-gcc4-fixes-v1/drivers/atm/iphase.c
35 --- linux-2.4.32/drivers/atm/iphase.c   2004-11-17 18:36:41.000000000 +0100
36 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/atm/iphase.c        2005-11-17 13:31:16.000000000 +0100
37 @@ -82,6 +82,7 @@ static IADEV *ia_dev[8];
38  static struct atm_dev *_ia_dev[8];
39  static int iadev_count;
40  static void ia_led_timer(unsigned long arg);
41 +static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb);
42  static struct timer_list ia_timer = { function: ia_led_timer };
43  struct atm_vcc *vcc_close_que[100];
44  static int IA_TX_BUF = DFL_TX_BUFFERS, IA_TX_BUF_SZ = DFL_TX_BUF_SZ;
45 @@ -627,7 +628,6 @@ static int ia_que_tx (IADEV *iadev) { 
46     int num_desc;
47     struct atm_vcc *vcc;
48     struct ia_vcc *iavcc;
49 -   static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb);
50     num_desc = ia_avail_descs(iadev);
51     while (num_desc && (skb = skb_dequeue(&iadev->tx_backlog))) {
52        if (!(vcc = ATM_SKB(skb)->vcc)) {
53 diff -rupN linux-2.4.32/drivers/atm/iphase.h linux-2.4.32.more-gcc4-fixes-v1/drivers/atm/iphase.h
54 --- linux-2.4.32/drivers/atm/iphase.h   2003-06-14 13:30:20.000000000 +0200
55 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/atm/iphase.h        2005-11-17 13:31:16.000000000 +0100
56 @@ -68,8 +68,6 @@
57  #define IF_IADBG_SUNI_STAT      0x02000000        // suni statistics
58  #define IF_IADBG_RESET          0x04000000        
59  
60 -extern unsigned int    IADebugFlag;
61 -
62  #define IF_IADBG(f) if (IADebugFlag & (f))
63  
64  #ifdef  CONFIG_ATM_IA_DEBUG   /* Debug build */
65 diff -rupN linux-2.4.32/drivers/block/nbd.c linux-2.4.32.more-gcc4-fixes-v1/drivers/block/nbd.c
66 --- linux-2.4.32/drivers/block/nbd.c    2005-04-04 19:56:04.000000000 +0200
67 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/block/nbd.c 2005-11-17 13:31:16.000000000 +0100
68 @@ -74,6 +74,29 @@ static int requests_in;
69  static int requests_out;
70  #endif
71  
72 +static void
73 +nbd_end_request(struct request *req)
74 +{
75 +       struct buffer_head *bh;
76 +       unsigned nsect;
77 +       unsigned long flags;
78 +       int uptodate = (req->errors == 0) ? 1 : 0;
79 +
80 +#ifdef PARANOIA
81 +       requests_out++;
82 +#endif
83 +       spin_lock_irqsave(&io_request_lock, flags);
84 +       while((bh = req->bh) != NULL) {
85 +               nsect = bh->b_size >> 9;
86 +               blk_finished_io(nsect);
87 +               req->bh = bh->b_reqnext;
88 +               bh->b_reqnext = NULL;
89 +               bh->b_end_io(bh, uptodate);
90 +       }
91 +       blkdev_release_request(req);
92 +       spin_unlock_irqrestore(&io_request_lock, flags);
93 +}
94 +
95  static int nbd_open(struct inode *inode, struct file *file)
96  {
97         int dev;
98 diff -rupN linux-2.4.32/drivers/block/paride/pd.c linux-2.4.32.more-gcc4-fixes-v1/drivers/block/paride/pd.c
99 --- linux-2.4.32/drivers/block/paride/pd.c      2002-11-30 17:12:24.000000000 +0100
100 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/block/paride/pd.c   2005-11-17 13:31:16.000000000 +0100
101 @@ -343,7 +343,14 @@ static char *pd_errs[17] = { "ERR","INDE
102  
103  /* kernel glue structures */
104  
105 -extern struct block_device_operations pd_fops;
106 +static struct block_device_operations pd_fops = {
107 +       owner:                  THIS_MODULE,
108 +        open:                  pd_open,
109 +        release:               pd_release,
110 +        ioctl:                 pd_ioctl,
111 +        check_media_change:    pd_check_media,
112 +        revalidate:            pd_revalidate
113 +};
114  
115  static struct gendisk pd_gendisk = {
116         major:          PD_MAJOR,
117 @@ -355,15 +362,6 @@ static struct gendisk pd_gendisk = {
118         fops:           &pd_fops,
119  };
120  
121 -static struct block_device_operations pd_fops = {
122 -       owner:                  THIS_MODULE,
123 -        open:                  pd_open,
124 -        release:               pd_release,
125 -        ioctl:                 pd_ioctl,
126 -        check_media_change:    pd_check_media,
127 -        revalidate:            pd_revalidate
128 -};
129 -
130  void pd_init_units( void )
131  
132  {      int     unit, j;
133 diff -rupN linux-2.4.32/drivers/block/xd.c linux-2.4.32.more-gcc4-fixes-v1/drivers/block/xd.c
134 --- linux-2.4.32/drivers/block/xd.c     2002-11-30 17:12:24.000000000 +0100
135 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/block/xd.c  2005-11-17 13:31:16.000000000 +0100
136 @@ -125,7 +125,12 @@ static int xd_sizes[XD_MAXDRIVES << 6], 
137  static int xd_blocksizes[XD_MAXDRIVES << 6];
138  static int xd_maxsect[XD_MAXDRIVES << 6];
139  
140 -extern struct block_device_operations xd_fops;
141 +static struct block_device_operations xd_fops = {
142 +       owner:          THIS_MODULE,
143 +       open:           xd_open,
144 +       release:        xd_release,
145 +       ioctl:          xd_ioctl,
146 +};
147  
148  static struct gendisk xd_gendisk = {
149         major:          MAJOR_NR,
150 @@ -138,13 +143,6 @@ static struct gendisk xd_gendisk = {
151         fops:           &xd_fops,
152  };
153  
154 -static struct block_device_operations xd_fops = {
155 -       owner:          THIS_MODULE,
156 -       open:           xd_open,
157 -       release:        xd_release,
158 -       ioctl:          xd_ioctl,
159 -};
160 -
161  static DECLARE_WAIT_QUEUE_HEAD(xd_wait_int);
162  static DECLARE_WAIT_QUEUE_HEAD(xd_wait_open);
163  static u8 xd_valid[XD_MAXDRIVES] = { 0,0 };
164 diff -rupN linux-2.4.32/drivers/cdrom/sbpcd.c linux-2.4.32.more-gcc4-fixes-v1/drivers/cdrom/sbpcd.c
165 --- linux-2.4.32/drivers/cdrom/sbpcd.c  2001-11-06 12:12:06.000000000 +0100
166 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/cdrom/sbpcd.c       2005-11-17 13:31:16.000000000 +0100
167 @@ -525,6 +525,8 @@ static int sbp_data(struct request *req)
168  static int cmd_out(void);
169  static int DiskInfo(void);
170  static int sbpcd_chk_disk_change(kdev_t);
171 +static int cmd_out_T(void);
172 +static int cc_DriveReset(void);
173  
174  /*==========================================================================*/
175  
176 @@ -1213,8 +1215,6 @@ static int get_state_T(void)
177  {
178         int i;
179         
180 -       static int cmd_out_T(void);
181 -
182         clr_cmdbuf();
183         D_S[d].n_bytes=1;
184         drvcmd[0]=CMDT_STATUS;
185 @@ -1362,7 +1362,6 @@ static int cmd_out_T(void)
186  #define CMDT_TRIES 1000
187  #define TEST_FALSE_FF 1
188         
189 -       static int cc_DriveReset(void);
190         int i, j, l=0, m, ntries;
191         long flags;
192  
193 diff -rupN linux-2.4.32/drivers/char/ip2/i2lib.c linux-2.4.32.more-gcc4-fixes-v1/drivers/char/ip2/i2lib.c
194 --- linux-2.4.32/drivers/char/ip2/i2lib.c       2005-01-19 18:00:53.000000000 +0100
195 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/char/ip2/i2lib.c    2005-11-17 13:31:16.000000000 +0100
196 @@ -1262,7 +1262,7 @@ i2RetryFlushOutput(i2ChanStrPtr pCh)
197  
198         }
199         if ( old_flags & STOPFL_FLAG ) {
200 -               if ( 1 == i2QueueCommands(PTYPE_INLINE, pCh, 0, 1, CMD_STOPFL) > 0 ) {
201 +               if ( 1 == i2QueueCommands(PTYPE_INLINE, pCh, 0, 1, CMD_STOPFL)) {
202                         old_flags = 0;  // Success - clear flags
203                 }
204  
205 diff -rupN linux-2.4.32/drivers/char/rio/rio_linux.c linux-2.4.32.more-gcc4-fixes-v1/drivers/char/rio/rio_linux.c
206 --- linux-2.4.32/drivers/char/rio/rio_linux.c   2002-02-26 13:26:56.000000000 +0100
207 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/char/rio/rio_linux.c        2005-11-17 13:31:16.000000000 +0100
208 @@ -1205,8 +1205,8 @@ static int __init rio_init(void) 
209        hp->Ivec = get_irq (pdev);
210        if (((1 << hp->Ivec) & rio_irqmask) == 0)
211                hp->Ivec = 0;
212 -      hp->CardP        = (struct DpRam *)
213        hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
214 +      hp->CardP        = (struct DpRam *) hp->Caddr;
215        hp->Type  = RIO_PCI;
216        hp->Copy  = rio_pcicopy; 
217        hp->Mode  = RIO_PCI_BOOT_FROM_RAM;
218 @@ -1277,8 +1277,8 @@ static int __init rio_init(void) 
219        if (((1 << hp->Ivec) & rio_irqmask) == 0) 
220         hp->Ivec = 0;
221        hp->Ivec |= 0x8000; /* Mark as non-sharable */
222 -      hp->CardP        = (struct DpRam *)
223        hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
224 +      hp->CardP        = (struct DpRam *) hp->Caddr;
225        hp->Type  = RIO_PCI;
226        hp->Copy  = rio_pcicopy;
227        hp->Mode  = RIO_PCI_BOOT_FROM_RAM;
228 @@ -1329,8 +1329,8 @@ static int __init rio_init(void) 
229      hp->PaddrP = rio_probe_addrs[i];
230      /* There was something about the IRQs of these cards. 'Forget what.--REW */
231      hp->Ivec = 0;
232 -    hp->CardP = (struct DpRam *)
233      hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
234 +    hp->CardP = (struct DpRam *) hp->Caddr;
235      hp->Type = RIO_AT;
236      hp->Copy = rio_pcicopy; /* AT card PCI???? - PVDL
237                               * -- YES! this is now a normal copy. Only the 
238 diff -rupN linux-2.4.32/drivers/char/sonypi.c linux-2.4.32.more-gcc4-fixes-v1/drivers/char/sonypi.c
239 --- linux-2.4.32/drivers/char/sonypi.c  2004-04-14 20:22:20.000000000 +0200
240 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/char/sonypi.c       2005-11-17 13:31:16.000000000 +0100
241 @@ -60,6 +60,35 @@ static int compat; /* = 0 */
242  static int useinput = 1;
243  static unsigned long mask = 0xffffffff;
244  
245 +static inline int sonypi_ec_write(u8 addr, u8 value) {
246 +#ifdef CONFIG_ACPI_EC
247 +       if (SONYPI_ACPI_ACTIVE)
248 +               return ec_write(addr, value);
249 +#endif
250 +       wait_on_command(1, inb_p(SONYPI_CST_IOPORT) & 3, ITERATIONS_LONG);
251 +       outb_p(0x81, SONYPI_CST_IOPORT);
252 +       wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG);
253 +       outb_p(addr, SONYPI_DATA_IOPORT);
254 +       wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG);
255 +       outb_p(value, SONYPI_DATA_IOPORT);
256 +       wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG);
257 +       return 0;
258 +}
259 +
260 +static inline int sonypi_ec_read(u8 addr, u8 *value) {
261 +#ifdef CONFIG_ACPI_EC
262 +       if (SONYPI_ACPI_ACTIVE)
263 +               return ec_read(addr, value);
264 +#endif
265 +       wait_on_command(1, inb_p(SONYPI_CST_IOPORT) & 3, ITERATIONS_LONG);
266 +       outb_p(0x80, SONYPI_CST_IOPORT);
267 +       wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG);
268 +       outb_p(addr, SONYPI_DATA_IOPORT);
269 +       wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG);
270 +       *value = inb_p(SONYPI_DATA_IOPORT);
271 +       return 0;
272 +}
273 +
274  /* Inits the queue */
275  static inline void sonypi_initq(void) {
276          sonypi_device.queue.head = sonypi_device.queue.tail = 0;
277 diff -rupN linux-2.4.32/drivers/char/sonypi.h linux-2.4.32.more-gcc4-fixes-v1/drivers/char/sonypi.h
278 --- linux-2.4.32/drivers/char/sonypi.h  2004-04-14 20:22:20.000000000 +0200
279 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/char/sonypi.h       2005-11-17 13:31:16.000000000 +0100
280 @@ -401,37 +401,6 @@ struct sonypi_device {
281  #define SONYPI_ACPI_ACTIVE 0
282  #endif /* CONFIG_ACPI */
283  
284 -extern int verbose;
285 -
286 -static inline int sonypi_ec_write(u8 addr, u8 value) {
287 -#ifdef CONFIG_ACPI_EC
288 -       if (SONYPI_ACPI_ACTIVE)
289 -               return ec_write(addr, value);
290 -#endif
291 -       wait_on_command(1, inb_p(SONYPI_CST_IOPORT) & 3, ITERATIONS_LONG);
292 -       outb_p(0x81, SONYPI_CST_IOPORT);
293 -       wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG);
294 -       outb_p(addr, SONYPI_DATA_IOPORT);
295 -       wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG);
296 -       outb_p(value, SONYPI_DATA_IOPORT);
297 -       wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG);
298 -       return 0;
299 -}
300 -
301 -static inline int sonypi_ec_read(u8 addr, u8 *value) {
302 -#ifdef CONFIG_ACPI_EC
303 -       if (SONYPI_ACPI_ACTIVE)
304 -               return ec_read(addr, value);
305 -#endif
306 -       wait_on_command(1, inb_p(SONYPI_CST_IOPORT) & 3, ITERATIONS_LONG);
307 -       outb_p(0x80, SONYPI_CST_IOPORT);
308 -       wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG);
309 -       outb_p(addr, SONYPI_DATA_IOPORT);
310 -       wait_on_command(0, inb_p(SONYPI_CST_IOPORT) & 2, ITERATIONS_LONG);
311 -       *value = inb_p(SONYPI_DATA_IOPORT);
312 -       return 0;
313 -}
314 -
315  #endif /* __KERNEL__ */
316  
317  #endif /* _SONYPI_PRIV_H_ */
318 diff -rupN linux-2.4.32/drivers/char/sx.c linux-2.4.32.more-gcc4-fixes-v1/drivers/char/sx.c
319 --- linux-2.4.32/drivers/char/sx.c      2005-01-19 18:00:53.000000000 +0100
320 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/char/sx.c   2005-11-17 13:31:16.000000000 +0100
321 @@ -522,13 +522,13 @@ static int sx_busy_wait_eq (struct sx_bo
322  
323         func_enter ();
324  
325 -       for (i=0; i < TIMEOUT_1 > 0;i++) 
326 +       for (i=0; i < TIMEOUT_1 ;i++) 
327                 if ((read_sx_byte (board, offset) & mask) == correctval) {
328                         func_exit ();
329                         return 1;
330                 }
331  
332 -       for (i=0; i < TIMEOUT_2 > 0;i++) {
333 +       for (i=0; i < TIMEOUT_2 ;i++) {
334                 if ((read_sx_byte (board, offset) & mask) == correctval) {
335                         func_exit ();
336                         return 1;
337 @@ -548,13 +548,13 @@ static int sx_busy_wait_neq (struct sx_b
338  
339         func_enter ();
340  
341 -       for (i=0; i < TIMEOUT_1 > 0;i++) 
342 +       for (i=0; i < TIMEOUT_1 ;i++) 
343                 if ((read_sx_byte (board, offset) & mask) != badval) {
344                         func_exit ();
345                         return 1;
346                 }
347  
348 -       for (i=0; i < TIMEOUT_2 > 0;i++) {
349 +       for (i=0; i < TIMEOUT_2 ;i++) {
350                 if ((read_sx_byte (board, offset) & mask) != badval) {
351                         func_exit ();
352                         return 1;
353 diff -rupN linux-2.4.32/drivers/char/tpqic02.c linux-2.4.32.more-gcc4-fixes-v1/drivers/char/tpqic02.c
354 --- linux-2.4.32/drivers/char/tpqic02.c 2004-08-08 10:56:31.000000000 +0200
355 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/char/tpqic02.c      2005-11-17 13:31:16.000000000 +0100
356 @@ -202,6 +202,7 @@ static int mode_access;             /* access mode:
357  
358  static int qic02_get_resources(void);
359  static void qic02_release_resources(void);
360 +static void finish_rw(int cmd);
361  
362  /* This is a pointer to the actual kernel buffer where the interrupt routines
363   * read from/write to. It is needed because the DMA channels 1 and 3 cannot
364 @@ -820,7 +821,6 @@ static int get_ext_status3(void)
365  static int tp_sense(int ignore)
366  {
367         unsigned err = 0, exnr = 0, gs = 0;
368 -       static void finish_rw(int cmd);
369  
370         if (TPQDBG(SENSE_TEXT))
371                 printk(TPQIC02_NAME ": tp_sense(ignore=0x%x) enter\n",
372 @@ -2173,16 +2173,6 @@ static ssize_t qic02_tape_write(struct f
373   * Don't rewind if the minor bits specify density 0.
374   */
375  
376 -static int qic02_tape_open(struct inode *inode, struct file *filp)
377 -{
378 -       static int qic02_tape_open_no_use_count(struct inode *,
379 -                                               struct file *);
380 -       int open_error;
381 -
382 -       open_error = qic02_tape_open_no_use_count(inode, filp);
383 -       return open_error;
384 -}
385 -
386  static int qic02_tape_open_no_use_count(struct inode *inode,
387                                         struct file *filp)
388  {
389 @@ -2385,6 +2375,14 @@ static int qic02_tape_open_no_use_count(
390  }                              /* qic02_tape_open */
391  
392  
393 +static int qic02_tape_open(struct inode *inode, struct file *filp)
394 +{
395 +       int open_error;
396 +
397 +       open_error = qic02_tape_open_no_use_count(inode, filp);
398 +       return open_error;
399 +}
400 +
401  static int qic02_tape_release(struct inode *inode, struct file *filp)
402  {
403         kdev_t dev = inode->i_rdev;
404 diff -rupN linux-2.4.32/drivers/i2c/i2c-core.c linux-2.4.32.more-gcc4-fixes-v1/drivers/i2c/i2c-core.c
405 --- linux-2.4.32/drivers/i2c/i2c-core.c 2005-06-01 18:02:21.000000000 +0200
406 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/i2c/i2c-core.c      2005-11-17 13:31:16.000000000 +0100
407 @@ -720,7 +720,7 @@ int i2cproc_cleanup(void)
408   * ----------------------------------------------------
409   */
410  
411 -int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg msgs[],int num)
412 +int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg *msgs,int num)
413  {
414         int ret;
415  
416 @@ -750,7 +750,7 @@ int i2c_master_send(struct i2c_client *c
417                 msg.addr   = client->addr;
418                 msg.flags = client->flags & I2C_M_TEN;
419                 msg.len = count;
420 -               (const char *)msg.buf = buf;
421 +               msg.buf = (char *)buf;
422         
423                 DEB2(printk(KERN_DEBUG "i2c-core.o: master_send: writing %d bytes on %s.\n",
424                         count,client->adapter->name));
425 diff -rupN linux-2.4.32/drivers/i2c/i2c-proc.c linux-2.4.32.more-gcc4-fixes-v1/drivers/i2c/i2c-proc.c
426 --- linux-2.4.32/drivers/i2c/i2c-proc.c 2005-01-19 18:00:53.000000000 +0100
427 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/i2c/i2c-proc.c      2005-11-17 13:31:16.000000000 +0100
428 @@ -205,7 +205,7 @@ void i2c_deregister_entry(int id)
429                 table = i2c_entries[id]->ctl_table;
430                 unregister_sysctl_table(i2c_entries[id]);
431                 /* 2-step kfree needed to keep gcc happy about const points */
432 -               (const char *) temp = table[4].procname;
433 +               temp = (char *) table[4].procname;
434                 kfree(temp);
435                 kfree(table);
436                 i2c_entries[id] = NULL;
437 @@ -287,7 +287,7 @@ int i2c_proc_chips(ctl_table * ctl, int 
438                         if(copy_to_user(buffer, BUF, buflen))
439                                 return -EFAULT;
440                         curbufsize += buflen;
441 -                       (char *) buffer += buflen;
442 +                       buffer = (char *) buffer + buflen;
443                 }
444         *lenp = curbufsize;
445         filp->f_pos += curbufsize;
446 @@ -318,7 +318,7 @@ int i2c_sysctl_chips(ctl_table * table, 
447                                              sizeof(struct
448                                                     i2c_chips_data)))
449                                         return -EFAULT;
450 -                               (char *) oldval +=
451 +                               oldval = (char *) oldval +
452                                     sizeof(struct i2c_chips_data);
453                                 nrels++;
454                         }
455 @@ -473,7 +473,7 @@ int i2c_parse_reals(int *nrels, void *bu
456                        !((ret=get_user(nextchar, (char *) buffer))) &&
457                        isspace((int) nextchar)) {
458                         bufsize--;
459 -                       ((char *) buffer)++;
460 +                       buffer = (char *) buffer + 1;
461                 }
462  
463                 if (ret)
464 @@ -492,7 +492,7 @@ int i2c_parse_reals(int *nrels, void *bu
465                     && (nextchar == '-')) {
466                         min = 1;
467                         bufsize--;
468 -                       ((char *) buffer)++;
469 +                       buffer = (char *) buffer + 1;
470                 }
471                 if (ret)
472                         return -EFAULT;
473 @@ -503,7 +503,7 @@ int i2c_parse_reals(int *nrels, void *bu
474                        isdigit((int) nextchar)) {
475                         res = res * 10 + nextchar - '0';
476                         bufsize--;
477 -                       ((char *) buffer)++;
478 +                       buffer = (char *) buffer + 1;
479                 }
480                 if (ret)
481                         return -EFAULT;
482 @@ -517,7 +517,7 @@ int i2c_parse_reals(int *nrels, void *bu
483                 if (bufsize && (nextchar == '.')) {
484                         /* Skip the dot */
485                         bufsize--;
486 -                       ((char *) buffer)++;
487 +                       buffer = (char *) buffer + 1;
488  
489                         /* Read digits while they are significant */
490                         while (bufsize && (mag > 0) &&
491 @@ -526,7 +526,7 @@ int i2c_parse_reals(int *nrels, void *bu
492                                 res = res * 10 + nextchar - '0';
493                                 mag--;
494                                 bufsize--;
495 -                               ((char *) buffer)++;
496 +                               buffer = (char *) buffer + 1;
497                         }
498                         if (ret)
499                                 return -EFAULT;
500 @@ -542,7 +542,7 @@ int i2c_parse_reals(int *nrels, void *bu
501                        !((ret=get_user(nextchar, (char *) buffer))) &&
502                        !isspace((int) nextchar)) {
503                         bufsize--;
504 -                       ((char *) buffer)++;
505 +                       buffer = (char *) buffer + 1;
506                 }
507                 if (ret)
508                         return -EFAULT;
509 @@ -574,7 +574,7 @@ int i2c_write_reals(int nrels, void *buf
510                         if(put_user(' ', (char *) buffer))
511                                 return -EFAULT;
512                         curbufsize++;
513 -                       ((char *) buffer)++;
514 +                       buffer = (char *) buffer + 1;
515                 }
516  
517                 /* Fill BUF with the representation of the next string */
518 @@ -615,7 +615,7 @@ int i2c_write_reals(int nrels, void *buf
519                 if(copy_to_user(buffer, BUF, buflen))
520                         return -EFAULT;
521                 curbufsize += buflen;
522 -               (char *) buffer += buflen;
523 +               buffer = (char *) buffer + buflen;
524  
525                 nr++;
526         }
527 diff -rupN linux-2.4.32/drivers/ide/legacy/hd.c linux-2.4.32.more-gcc4-fixes-v1/drivers/ide/legacy/hd.c
528 --- linux-2.4.32/drivers/ide/legacy/hd.c        2003-06-14 13:30:22.000000000 +0200
529 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/ide/legacy/hd.c     2005-11-17 13:31:16.000000000 +0100
530 @@ -694,7 +694,11 @@ static int hd_release(struct inode * ino
531         return 0;
532  }
533  
534 -extern struct block_device_operations hd_fops;
535 +static struct block_device_operations hd_fops = {
536 +       open:           hd_open,
537 +       release:        hd_release,
538 +       ioctl:          hd_ioctl,
539 +};
540  
541  static struct gendisk hd_gendisk = {
542         major:          MAJOR_NR,
543 @@ -718,12 +722,6 @@ static void hd_interrupt(int irq, void *
544         sti();
545  }
546  
547 -static struct block_device_operations hd_fops = {
548 -       open:           hd_open,
549 -       release:        hd_release,
550 -       ioctl:          hd_ioctl,
551 -};
552 -
553  /*
554   * This is the hard disk IRQ description. The SA_INTERRUPT in sa_flags
555   * means we run the IRQ-handler with interrupts disabled:  this is bad for
556 diff -rupN linux-2.4.32/drivers/ieee1394/highlevel.c linux-2.4.32.more-gcc4-fixes-v1/drivers/ieee1394/highlevel.c
557 --- linux-2.4.32/drivers/ieee1394/highlevel.c   2003-11-29 00:28:11.000000000 +0100
558 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/ieee1394/highlevel.c        2005-11-17 13:31:16.000000000 +0100
559 @@ -500,7 +500,7 @@ int highlevel_read(struct hpsb_host *hos
560                                  rcode = RCODE_TYPE_ERROR;
561                          }
562  
563 -                       (u8 *)data += partlength;
564 +                       data += partlength;
565                          length -= partlength;
566                          addr += partlength;
567  
568 @@ -546,7 +546,7 @@ int highlevel_write(struct hpsb_host *ho
569                                  rcode = RCODE_TYPE_ERROR;
570                          }
571  
572 -                       (u8 *)data += partlength;
573 +                       data += partlength;
574                          length -= partlength;
575                          addr += partlength;
576  
577 diff -rupN linux-2.4.32/drivers/isdn/eicon/eicon.h linux-2.4.32.more-gcc4-fixes-v1/drivers/isdn/eicon/eicon.h
578 --- linux-2.4.32/drivers/isdn/eicon/eicon.h     2002-08-07 00:52:20.000000000 +0200
579 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/isdn/eicon/eicon.h  2005-11-17 13:31:16.000000000 +0100
580 @@ -344,7 +344,6 @@ typedef struct eicon_card {
581  
582  #include "eicon_idi.h"
583  
584 -extern eicon_card *cards;
585  extern char *eicon_ctype_name[];
586  
587  
588 diff -rupN linux-2.4.32/drivers/isdn/hisax/hfc_pci.c linux-2.4.32.more-gcc4-fixes-v1/drivers/isdn/hisax/hfc_pci.c
589 --- linux-2.4.32/drivers/isdn/hisax/hfc_pci.c   2004-11-17 18:36:42.000000000 +0100
590 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/isdn/hisax/hfc_pci.c        2005-11-17 13:31:16.000000000 +0100
591 @@ -1742,7 +1742,7 @@ setup_hfcpci(struct IsdnCard *card)
592                 /* Allocate memory for FIFOS */
593                 /* Because the HFC-PCI needs a 32K physical alignment, we */
594                 /* need to allocate the double mem and align the address */
595 -               if (!((void *) cs->hw.hfcpci.share_start = kmalloc(65536, GFP_KERNEL))) {
596 +               if (!(cs->hw.hfcpci.share_start = kmalloc(65536, GFP_KERNEL))) {
597                         printk(KERN_WARNING "HFC-PCI: Error allocating memory for FIFO!\n");
598                         return 0;
599                 }
600 diff -rupN linux-2.4.32/drivers/md/lvm-internal.h linux-2.4.32.more-gcc4-fixes-v1/drivers/md/lvm-internal.h
601 --- linux-2.4.32/drivers/md/lvm-internal.h      2003-11-29 00:28:12.000000000 +0100
602 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/md/lvm-internal.h   2005-11-17 13:31:16.000000000 +0100
603 @@ -45,7 +45,6 @@ extern int loadtime;
604  extern const char *const lvm_name;
605  
606  
607 -extern uint vg_count;
608  extern vg_t *vg[];
609  extern struct file_operations lvm_chr_fops;
610  
611 diff -rupN linux-2.4.32/drivers/media/video/bttvp.h linux-2.4.32.more-gcc4-fixes-v1/drivers/media/video/bttvp.h
612 --- linux-2.4.32/drivers/media/video/bttvp.h    2003-11-29 00:28:12.000000000 +0100
613 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/media/video/bttvp.h 2005-11-17 13:31:16.000000000 +0100
614 @@ -58,7 +58,6 @@ extern int pvr_boot(struct bttv *btv);
615  
616  #define BTTV_MAX 16
617  extern unsigned int bttv_num;                  /* number of Bt848s in use */
618 -extern struct bttv bttvs[BTTV_MAX];
619  
620  #define UNSET -1U
621  
622 @@ -203,6 +202,8 @@ struct bttv {
623         int shutdown;
624          void (*audio_hook)(struct bttv *btv, struct video_audio *v, int set);
625  };
626 +
627 +extern struct bttv bttvs[BTTV_MAX];
628  #endif
629  
630  #define btwrite(dat,adr)    writel((dat), (char *) (btv->bt848_mem+(adr)))
631 diff -rupN linux-2.4.32/drivers/media/video/videodev.c linux-2.4.32.more-gcc4-fixes-v1/drivers/media/video/videodev.c
632 --- linux-2.4.32/drivers/media/video/videodev.c 2004-08-08 10:56:31.000000000 +0200
633 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/media/video/videodev.c      2005-11-17 13:31:16.000000000 +0100
634 @@ -489,7 +489,18 @@ static void videodev_proc_destroy_dev (s
635  
636  #endif /* CONFIG_VIDEO_PROC_FS */
637  
638 -extern struct file_operations video_fops;
639 +static struct file_operations video_fops=
640 +{
641 +       owner:          THIS_MODULE,
642 +       llseek:         no_llseek,
643 +       read:           video_read,
644 +       write:          video_write,
645 +       ioctl:          video_ioctl,
646 +       mmap:           video_mmap,
647 +       open:           video_open,
648 +       release:        video_release,
649 +       poll:           video_poll,
650 +};
651  
652  /**
653   *     video_register_device - register video4linux devices
654 @@ -633,19 +644,6 @@ void video_unregister_device(struct vide
655  }
656  
657  
658 -static struct file_operations video_fops=
659 -{
660 -       owner:          THIS_MODULE,
661 -       llseek:         no_llseek,
662 -       read:           video_read,
663 -       write:          video_write,
664 -       ioctl:          video_ioctl,
665 -       mmap:           video_mmap,
666 -       open:           video_open,
667 -       release:        video_release,
668 -       poll:           video_poll,
669 -};
670 -
671  /*
672   *     Initialise video for linux
673   */
674 diff -rupN linux-2.4.32/drivers/net/3c507.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/3c507.c
675 --- linux-2.4.32/drivers/net/3c507.c    2003-11-29 00:28:12.000000000 +0100
676 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/3c507.c 2005-11-17 13:31:16.000000000 +0100
677 @@ -306,6 +306,7 @@ static void el16_tx_timeout (struct net_
678  static void hardware_send_packet(struct net_device *dev, void *buf, short length, short pad);
679  static void init_82586_mem(struct net_device *dev);
680  static struct ethtool_ops netdev_ethtool_ops;
681 +static void init_rx_bufs(struct net_device *);
682  
683  \f
684  /* Check for a network adaptor of this type, and return '0' iff one exists.
685 @@ -602,7 +603,6 @@ static void el16_interrupt(int irq, void
686         }
687  
688         if ((status & 0x0070) != 0x0040 && netif_running(dev)) {
689 -               static void init_rx_bufs(struct net_device *);
690                 /* The Rx unit is not ready, it must be hung.  Restart the receiver by
691                    initializing the rx buffers, and issuing an Rx start command. */
692                 if (net_debug)
693 diff -rupN linux-2.4.32/drivers/net/acenic.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/acenic.c
694 --- linux-2.4.32/drivers/net/acenic.c   2003-08-25 20:07:43.000000000 +0200
695 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/acenic.c        2005-11-17 13:31:16.000000000 +0100
696 @@ -594,6 +594,7 @@ static struct net_device *root_dev;
697  
698  static int probed __initdata = 0;
699  
700 +static void ace_watchdog(struct net_device *dev);
701  
702  int __devinit acenic_probe (ACE_PROBE_ARG)
703  {
704 @@ -665,7 +666,6 @@ int __devinit acenic_probe (ACE_PROBE_AR
705                 dev->vlan_rx_kill_vid = ace_vlan_rx_kill_vid;
706  #endif
707                 if (1) {
708 -                       static void ace_watchdog(struct net_device *dev);
709                         dev->tx_timeout = &ace_watchdog;
710                         dev->watchdog_timeo = 5*HZ;
711                 }
712 diff -rupN linux-2.4.32/drivers/net/arcnet/arcnet.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/arcnet/arcnet.c
713 --- linux-2.4.32/drivers/net/arcnet/arcnet.c    2003-08-25 20:07:43.000000000 +0200
714 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/arcnet/arcnet.c 2005-11-17 13:31:16.000000000 +0100
715 @@ -277,7 +277,7 @@ static void release_arcbuf(struct net_de
716         BUGLVL(D_DURING) {
717                 BUGMSG(D_DURING, "release_arcbuf: freed #%d; buffer queue is now: ",
718                        bufnum);
719 -               for (i = lp->next_buf; i != lp->first_free_buf; i = ++i % 5)
720 +               for (i = lp->next_buf; i != lp->first_free_buf; i = (i+1) % 5)
721                         BUGMSG2(D_DURING, "#%d ", lp->buf_queue[i]);
722                 BUGMSG2(D_DURING, "\n");
723         }
724 @@ -310,7 +310,7 @@ static int get_arcbuf(struct net_device 
725  
726         BUGLVL(D_DURING) {
727                 BUGMSG(D_DURING, "get_arcbuf: got #%d; buffer queue is now: ", buf);
728 -               for (i = lp->next_buf; i != lp->first_free_buf; i = ++i % 5)
729 +               for (i = lp->next_buf; i != lp->first_free_buf; i = (i+1) % 5)
730                         BUGMSG2(D_DURING, "#%d ", lp->buf_queue[i]);
731                 BUGMSG2(D_DURING, "\n");
732         }
733 diff -rupN linux-2.4.32/drivers/net/arlan.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/arlan.c
734 --- linux-2.4.32/drivers/net/arlan.c    2002-08-07 00:52:20.000000000 +0200
735 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/arlan.c 2005-11-17 13:31:16.000000000 +0100
736 @@ -12,7 +12,7 @@
737  #  error FIXME: this driver requires a 32-bit platform
738  #endif
739  
740 -static const char *arlan_version = "C.Jennigs 97 & Elmer.Joandi@ut.ee  Oct'98, http://www.ylenurme.ee/~elmer/655/";
741 +const char *arlan_version = "C.Jennigs 97 & Elmer.Joandi@ut.ee  Oct'98, http://www.ylenurme.ee/~elmer/655/";
742  
743  struct net_device *arlan_device[MAX_ARLANS];
744  int last_arlan;
745 diff -rupN linux-2.4.32/drivers/net/arlan.h linux-2.4.32.more-gcc4-fixes-v1/drivers/net/arlan.h
746 --- linux-2.4.32/drivers/net/arlan.h    2001-03-30 19:05:06.000000000 +0200
747 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/arlan.h 2005-11-17 13:31:16.000000000 +0100
748 @@ -47,7 +47,6 @@ extern int    init_arlan_proc(void);
749  
750  extern struct net_device *arlan_device[MAX_ARLANS];
751  extern int     arlan_debug;
752 -extern char *  siteName;
753  extern int     arlan_entry_debug;
754  extern int     arlan_exit_debug;
755  extern int     testMemory;
756 diff -rupN linux-2.4.32/drivers/net/de4x5.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/de4x5.c
757 --- linux-2.4.32/drivers/net/de4x5.c    2004-02-18 15:16:23.000000000 +0100
758 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/de4x5.c 2005-11-17 13:31:16.000000000 +0100
759 @@ -5109,7 +5109,7 @@ mii_get_phy(struct net_device *dev)
760      lp->useMII = TRUE;
761  
762      /* Search the MII address space for possible PHY devices */
763 -    for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(++i)%DE4X5_MAX_MII) {
764 +    for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(i+1)%DE4X5_MAX_MII) {
765         lp->phy[lp->active].addr = i;
766         if (i==0) n++;                             /* Count cycles */
767         while (de4x5_reset_phy(dev)<0) udelay(100);/* Wait for reset */
768 diff -rupN linux-2.4.32/drivers/net/depca.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/depca.c
769 --- linux-2.4.32/drivers/net/depca.c    2003-06-14 13:30:23.000000000 +0200
770 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/depca.c 2005-11-17 13:31:16.000000000 +0100
771 @@ -1746,7 +1746,7 @@ static int load_packet(struct net_device
772  
773                 /* set up the buffer descriptors */
774                 len = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len;
775 -               for (i = entry; i != end; i = (++i) & lp->txRingMask) {
776 +               for (i = entry; i != end; i = (i+1) & lp->txRingMask) {
777                         /* clean out flags */
778                         writel(readl(&lp->tx_ring[i].base) & ~T_FLAGS, &lp->tx_ring[i].base);
779                         writew(0x0000, &lp->tx_ring[i].misc);   /* clears other error flags */
780 diff -rupN linux-2.4.32/drivers/net/hamradio/baycom_epp.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/hamradio/baycom_epp.c
781 --- linux-2.4.32/drivers/net/hamradio/baycom_epp.c      2002-11-30 17:12:25.000000000 +0100
782 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/hamradio/baycom_epp.c   2005-11-17 13:31:16.000000000 +0100
783 @@ -60,8 +60,10 @@
784  #include <net/ax25.h> 
785  #endif /* CONFIG_AX25 || CONFIG_AX25_MODULE */
786  
787 +static int my_errno;
788 +#define errno my_errno
789  #define __KERNEL_SYSCALLS__
790 -#include <linux/unistd.h>
791 +#include <asm/unistd.h>
792  
793  /* --------------------------------------------------------------------- */
794  
795 @@ -370,8 +372,6 @@ static char eppconfig_path[256] = "/usr/
796  
797  static char *envp[] = { "HOME=/", "TERM=linux", "PATH=/usr/bin:/bin", NULL };
798  
799 -static int errno;
800 -
801  static int exec_eppfpga(void *b)
802  {
803         struct baycom_state *bc = (struct baycom_state *)b;
804 diff -rupN linux-2.4.32/drivers/net/hamradio/soundmodem/sm.h linux-2.4.32.more-gcc4-fixes-v1/drivers/net/hamradio/soundmodem/sm.h
805 --- linux-2.4.32/drivers/net/hamradio/soundmodem/sm.h   2002-08-07 00:52:20.000000000 +0200
806 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/hamradio/soundmodem/sm.h        2005-11-17 13:31:16.000000000 +0100
807 @@ -151,7 +151,6 @@ struct hardware_info {
808  /* --------------------------------------------------------------------- */
809  
810  extern const char sm_drvname[];
811 -extern const char sm_drvinfo[];
812  
813  /* --------------------------------------------------------------------- */
814  /*
815 @@ -353,7 +352,6 @@ extern const struct hardware_info sm_hw_
816  
817  extern const struct modem_tx_info *sm_modem_tx_table[];
818  extern const struct modem_rx_info *sm_modem_rx_table[];
819 -extern const struct hardware_info *sm_hardware_table[];
820  
821  /* --------------------------------------------------------------------- */
822  
823 diff -rupN linux-2.4.32/drivers/net/irda/donauboe.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/irda/donauboe.c
824 --- linux-2.4.32/drivers/net/irda/donauboe.c    2003-06-14 13:30:23.000000000 +0200
825 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/irda/donauboe.c 2005-11-17 13:31:16.000000000 +0100
826 @@ -209,7 +209,11 @@ static int do_probe = DO_PROBE;
827  #ifdef CRC_EXPORTED
828  extern __u16 const irda_crc16_table[];
829  #else
830 -static __u16 const irda_crc16_table[256] = {
831 +/* Our local version of irda_crc16_table must have a unique
832 +   name to prevent extern-redefined-as-static compile errors.
833 +   This #define redirects the irda_fcs() macro to our version. */
834 +#define irda_crc16_table donauboe_irda_crc16_table
835 +static __u16 const donauboe_irda_crc16_table[256] = {
836    0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
837    0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
838    0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
839 diff -rupN linux-2.4.32/drivers/net/rrunner.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/rrunner.c
840 --- linux-2.4.32/drivers/net/rrunner.c  2003-06-14 13:30:23.000000000 +0200
841 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/rrunner.c       2005-11-17 13:31:16.000000000 +0100
842 @@ -234,7 +234,7 @@ int __init rr_hippi_probe (struct net_de
843                  * Don't access any registes before this point!
844                  */
845  #ifdef __BIG_ENDIAN
846 -               writel(readl(&regs->HostCtrl) | NO_SWAP, &regs->HostCtrl);
847 +               writel(readl(&rrpriv->regs->HostCtrl) | NO_SWAP, &rrpriv->regs->HostCtrl);
848  #endif
849                 /*
850                  * Need to add a case for little-endian 64-bit hosts here.
851 diff -rupN linux-2.4.32/drivers/net/sk98lin/skvpd.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/sk98lin/skvpd.c
852 --- linux-2.4.32/drivers/net/sk98lin/skvpd.c    2005-04-04 19:56:04.000000000 +0200
853 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/sk98lin/skvpd.c 2005-11-17 13:31:16.000000000 +0100
854 @@ -472,7 +472,7 @@ SK_IOC      IoC)    /* IO Context */
855             ((unsigned char)pAC->vpd.vpd_buf[0x40] == 0x3c) &&
856             ((unsigned char)pAC->vpd.vpd_buf[0x41] == 0x45) ) {
857                 printk(KERN_INFO "sk98lin : humm... Asus mainboard with buggy VPD ? correcting data.\n");
858 -               (unsigned char)pAC->vpd.vpd_buf[0x40] = 0x38;
859 +               pAC->vpd.vpd_buf[0x40] = 0x38;
860         }
861  
862         /* find the end tag of the RO area */
863 diff -rupN linux-2.4.32/drivers/net/wan/comx-hw-comx.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/wan/comx-hw-comx.c
864 --- linux-2.4.32/drivers/net/wan/comx-hw-comx.c 2002-11-30 17:12:26.000000000 +0100
865 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/wan/comx-hw-comx.c      2005-11-17 13:31:16.000000000 +0100
866 @@ -92,9 +92,9 @@ struct comx_privdata {
867  };
868  
869  static struct net_device *memory_used[(COMX_MEM_MAX - COMX_MEM_MIN) / 0x10000];
870 -extern struct comx_hardware hicomx_hw;
871 -extern struct comx_hardware comx_hw;
872 -extern struct comx_hardware cmx_hw;
873 +static struct comx_hardware hicomx_hw;
874 +static struct comx_hardware comx_hw;
875 +static struct comx_hardware cmx_hw;
876  
877  static void COMX_interrupt(int irq, void *dev_id, struct pt_regs *regs);
878  
879 diff -rupN linux-2.4.32/drivers/net/wan/comx.h linux-2.4.32.more-gcc4-fixes-v1/drivers/net/wan/comx.h
880 --- linux-2.4.32/drivers/net/wan/comx.h 2001-08-16 23:47:01.000000000 +0200
881 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/wan/comx.h      2005-11-17 13:31:16.000000000 +0100
882 @@ -212,8 +212,6 @@ typedef u16 word;
883  #define        SEEK_END        2
884  #endif
885  
886 -extern struct proc_dir_entry * comx_root_dir;
887 -
888  extern int     comx_register_hardware(struct comx_hardware *comx_hw);
889  extern int     comx_unregister_hardware(char *name);
890  extern int     comx_register_protocol(struct comx_protocol *comx_line);
891 diff -rupN linux-2.4.32/drivers/net/wan/sdla_fr.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/wan/sdla_fr.c
892 --- linux-2.4.32/drivers/net/wan/sdla_fr.c      2003-11-29 00:28:12.000000000 +0100
893 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/wan/sdla_fr.c   2005-11-17 13:31:16.000000000 +0100
894 @@ -3929,7 +3929,7 @@ static int process_udp_mgmt_pkt(sdla_t* 
895                                  break;
896                          }
897  
898 -                       (void *)ptr_trc_el = card->u.f.curr_trc_el;
899 +                       ptr_trc_el = (void *)card->u.f.curr_trc_el;
900  
901                          buffer_length = 0;
902                         fr_udp_pkt->data[0x00] = 0x00;
903 @@ -3980,7 +3980,7 @@ static int process_udp_mgmt_pkt(sdla_t* 
904                                 
905                                 ptr_trc_el ++;
906                                 if((void *)ptr_trc_el > card->u.f.trc_el_last)
907 -                                       (void*)ptr_trc_el = card->u.f.trc_el_base;
908 +                                       ptr_trc_el = (void*)card->u.f.trc_el_base;
909  
910                                 buffer_length += sizeof(fpipemon_trc_hdr_t);
911                                         if(fpipemon_trc->fpipemon_trc_hdr.data_passed) {
912 diff -rupN linux-2.4.32/drivers/net/wan/sdladrv.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/wan/sdladrv.c
913 --- linux-2.4.32/drivers/net/wan/sdladrv.c      2001-09-23 21:06:34.000000000 +0200
914 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/wan/sdladrv.c   2005-11-17 13:31:16.000000000 +0100
915 @@ -1002,7 +1002,7 @@ int sdla_peek (sdlahw_t* hw, unsigned lo
916                          peek_by_4 ((unsigned long)hw->dpmbase + curpos, buf,
917                                 curlen);
918                          addr       += curlen;
919 -                        (char*)buf += curlen;
920 +                        buf         = (char*)buf + curlen;
921                          len        -= curlen;
922                  }
923  
924 @@ -1086,7 +1086,7 @@ int sdla_poke (sdlahw_t* hw, unsigned lo
925                          poke_by_4 ((unsigned long)hw->dpmbase + curpos, buf,
926                                 curlen);
927                         addr       += curlen;
928 -                        (char*)buf += curlen;
929 +                        buf         = (char*)buf + curlen;
930                          len        -= curlen;
931                  }
932  
933 @@ -2127,10 +2127,10 @@ static int detect_s514 (sdlahw_t* hw)
934                 modname, hw->irq);
935  
936         /* map the physical PCI memory to virtual memory */
937 -       (void *)hw->dpmbase = ioremap((unsigned long)S514_mem_base_addr,
938 +       hw->dpmbase = (void *)ioremap((unsigned long)S514_mem_base_addr,
939                 (unsigned long)MAX_SIZEOF_S514_MEMORY);
940         /* map the physical control register memory to virtual memory */
941 -       (void *)hw->vector = ioremap(
942 +       hw->vector = (unsigned long)ioremap(
943                 (unsigned long)(S514_mem_base_addr + S514_CTRL_REG_BYTE),
944                 (unsigned long)16);
945       
946 diff -rupN linux-2.4.32/drivers/net/wan/sdlamain.c linux-2.4.32.more-gcc4-fixes-v1/drivers/net/wan/sdlamain.c
947 --- linux-2.4.32/drivers/net/wan/sdlamain.c     2003-11-29 00:28:12.000000000 +0100
948 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/net/wan/sdlamain.c  2005-11-17 13:31:16.000000000 +0100
949 @@ -1027,7 +1027,7 @@ static int ioctl_dump (sdla_t* card, sdl
950                        #endif
951                          dump.length     -= len;
952                          dump.offset     += len;
953 -                        (char*)dump.ptr += len;
954 +                        dump.ptr         = (char*)dump.ptr + len;
955                  }
956                 
957                  sdla_mapmem(&card->hw, oldvec);/* restore DPM window position */
958 diff -rupN linux-2.4.32/drivers/scsi/advansys.c linux-2.4.32.more-gcc4-fixes-v1/drivers/scsi/advansys.c
959 --- linux-2.4.32/drivers/scsi/advansys.c        2005-01-19 18:00:53.000000000 +0100
960 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/scsi/advansys.c     2005-11-17 13:31:16.000000000 +0100
961 @@ -3456,9 +3456,9 @@ do { \
962  /*
963   * Default EEPROM Configuration structure defined in a_init.c.
964   */
965 -extern ADVEEP_3550_CONFIG Default_3550_EEPROM_Config;
966 -extern ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config;
967 -extern ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config;
968 +static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config;
969 +static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config;
970 +static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config;
971  
972  /*
973   * DvcGetPhyAddr() flag arguments
974 @@ -7171,7 +7171,7 @@ asc_isr_callback(ASC_DVC_VAR *asc_dvc_va
975           * then return the number of underrun bytes.
976           */
977          if (scp->request_bufflen != 0 && qdonep->remain_bytes != 0 &&
978 -            qdonep->remain_bytes <= scp->request_bufflen != 0) {
979 +            qdonep->remain_bytes <= scp->request_bufflen) {
980              ASC_DBG1(1, "asc_isr_callback: underrun condition %u bytes\n",
981              (unsigned) qdonep->remain_bytes);
982              scp->resid = qdonep->remain_bytes;
983 diff -rupN linux-2.4.32/drivers/scsi/atp870u.c linux-2.4.32.more-gcc4-fixes-v1/drivers/scsi/atp870u.c
984 --- linux-2.4.32/drivers/scsi/atp870u.c 2002-08-07 00:52:21.000000000 +0200
985 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/scsi/atp870u.c      2005-11-17 13:31:16.000000000 +0100
986 @@ -807,19 +807,19 @@ oktosend:
987                         bttl = virt_to_bus(sgpnt[j].address);
988                         l = sgpnt[j].length;
989                         while (l > 0x10000) {
990 -                               (unsigned short int) (((unsigned short int *) (prd))[i + 3]) = 0x0000;
991 -                               (unsigned short int) (((unsigned short int *) (prd))[i + 2]) = 0x0000;
992 -                               (unsigned long) (((unsigned long *) (prd))[i >> 1]) = bttl;
993 +                               (((unsigned short int *) (prd))[i + 3]) = 0x0000;
994 +                               (((unsigned short int *) (prd))[i + 2]) = 0x0000;
995 +                               (((unsigned long *) (prd))[i >> 1]) = bttl;
996                                 l -= 0x10000;
997                                 bttl += 0x10000;
998                                 i += 0x04;
999                         }
1000 -                       (unsigned long) (((unsigned long *) (prd))[i >> 1]) = bttl;
1001 -                       (unsigned short int) (((unsigned short int *) (prd))[i + 2]) = l;
1002 -                       (unsigned short int) (((unsigned short int *) (prd))[i + 3]) = 0;
1003 +                       (((unsigned long *) (prd))[i >> 1]) = bttl;
1004 +                       (((unsigned short int *) (prd))[i + 2]) = l;
1005 +                       (((unsigned short int *) (prd))[i + 3]) = 0;
1006                         i += 0x04;
1007                 }
1008 -               (unsigned short int) (((unsigned short int *) (prd))[i - 1]) = 0x8000;
1009 +               (((unsigned short int *) (prd))[i - 1]) = 0x8000;
1010         } else {
1011                 /*
1012                  *      For a linear request write a chain of blocks
1013 @@ -828,16 +828,16 @@ oktosend:
1014                 l = workrequ->request_bufflen;
1015                 i = 0;
1016                 while (l > 0x10000) {
1017 -                       (unsigned short int) (((unsigned short int *) (prd))[i + 3]) = 0x0000;
1018 -                       (unsigned short int) (((unsigned short int *) (prd))[i + 2]) = 0x0000;
1019 -                       (unsigned long) (((unsigned long *) (prd))[i >> 1]) = bttl;
1020 +                       (((unsigned short int *) (prd))[i + 3]) = 0x0000;
1021 +                       (((unsigned short int *) (prd))[i + 2]) = 0x0000;
1022 +                       (((unsigned long *) (prd))[i >> 1]) = bttl;
1023                         l -= 0x10000;
1024                         bttl += 0x10000;
1025                         i += 0x04;
1026                 }
1027 -               (unsigned short int) (((unsigned short int *) (prd))[i + 3]) = 0x8000;
1028 -               (unsigned short int) (((unsigned short int *) (prd))[i + 2]) = l;
1029 -               (unsigned long) (((unsigned long *) (prd))[i >> 1]) = bttl;
1030 +               (((unsigned short int *) (prd))[i + 3]) = 0x8000;
1031 +               (((unsigned short int *) (prd))[i + 2]) = l;
1032 +               (((unsigned long *) (prd))[i >> 1]) = bttl;
1033         }
1034         tmpcip = tmpcip + 4;
1035         dev->id[target_id].prdaddru = virt_to_bus(dev->id[target_id].prd_tableu);
1036 diff -rupN linux-2.4.32/drivers/scsi/cpqfcTSstructs.h linux-2.4.32.more-gcc4-fixes-v1/drivers/scsi/cpqfcTSstructs.h
1037 --- linux-2.4.32/drivers/scsi/cpqfcTSstructs.h  2004-02-18 15:16:23.000000000 +0100
1038 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/scsi/cpqfcTSstructs.h       2005-11-17 13:31:16.000000000 +0100
1039 @@ -965,7 +965,6 @@ void fcSestReset(CPQFCHBA *);
1040  
1041  void cpqfc_pci_unmap(struct pci_dev *pcidev, Scsi_Cmnd * cmd, PTACHYON fcChip, __u32 x_ID);
1042  
1043 -extern const __u8 valid_al_pa[];
1044  extern const int number_of_al_pa;
1045  
1046  #define FCP_RESID_UNDER   0x80000
1047 diff -rupN linux-2.4.32/drivers/scsi/cpqfcTSworker.c linux-2.4.32.more-gcc4-fixes-v1/drivers/scsi/cpqfcTSworker.c
1048 --- linux-2.4.32/drivers/scsi/cpqfcTSworker.c   2003-06-14 13:30:24.000000000 +0200
1049 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/scsi/cpqfcTSworker.c        2005-11-17 13:31:16.000000000 +0100
1050 @@ -48,6 +48,7 @@
1051  #include "cpqfcTSchip.h"
1052  #include "cpqfcTSstructs.h"
1053  #include "cpqfcTStrigger.h"
1054 +static const __u8 valid_al_pa[];
1055  
1056  //#define LOGIN_DBG 1
1057  
1058 diff -rupN linux-2.4.32/drivers/sound/wavfront.c linux-2.4.32.more-gcc4-fixes-v1/drivers/sound/wavfront.c
1059 --- linux-2.4.32/drivers/sound/wavfront.c       2001-10-11 13:34:42.000000000 +0200
1060 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/sound/wavfront.c    2005-11-17 13:31:16.000000000 +0100
1061 @@ -2484,11 +2484,11 @@ static int __init detect_wavefront (int 
1062  #include <linux/fs.h>
1063  #include <linux/mm.h>
1064  #include <linux/slab.h>
1065 -#include <linux/unistd.h>
1066 +static int my_errno;
1067 +#define errno my_errno
1068 +#include <asm/unistd.h>
1069  #include <asm/uaccess.h>
1070  
1071 -static int errno; 
1072 -
1073  static int
1074  wavefront_download_firmware (char *path)
1075  
1076 diff -rupN linux-2.4.32/drivers/usb/audio.c linux-2.4.32.more-gcc4-fixes-v1/drivers/usb/audio.c
1077 --- linux-2.4.32/drivers/usb/audio.c    2004-11-17 18:36:42.000000000 +0100
1078 +++ linux-2.4.32.more-gcc4-fixes-v1/drivers/usb/audio.c 2005-11-17 13:31:16.000000000 +0100
1079 @@ -462,6 +462,7 @@ struct usb_audio_state {
1080  
1081  /* prevent picking up a bogus abs macro */
1082  #undef abs
1083 +#define abs my_abs
1084  static inline int abs(int x)
1085  {
1086          if (x < 0)
1087 diff -rupN linux-2.4.32/fs/intermezzo/presto.c linux-2.4.32.more-gcc4-fixes-v1/fs/intermezzo/presto.c
1088 --- linux-2.4.32/fs/intermezzo/presto.c 2002-11-30 17:12:28.000000000 +0100
1089 +++ linux-2.4.32.more-gcc4-fixes-v1/fs/intermezzo/presto.c      2005-11-17 13:31:16.000000000 +0100
1090 @@ -344,8 +344,8 @@ int izo_mark_cache(struct dentry *dentry
1091                  return -EBADF;
1092          }
1093  
1094 -        ((int)cache->cache_flags) &= and_flag;
1095 -        ((int)cache->cache_flags) |= or_flag;
1096 +        cache->cache_flags &= and_flag;
1097 +        cache->cache_flags |= or_flag;
1098          if (res)
1099                  *res = (int)cache->cache_flags;
1100  
1101 @@ -383,8 +383,8 @@ int izo_mark_fset(struct dentry *dentry,
1102                  make_bad_inode(dentry->d_inode);
1103                  return -EBADF;
1104          }
1105 -        ((int)fset->fset_flags) &= and_flag;
1106 -        ((int)fset->fset_flags) |= or_flag;
1107 +        fset->fset_flags &= and_flag;
1108 +        fset->fset_flags |= or_flag;
1109          if (res)
1110                  *res = (int)fset->fset_flags;
1111  
1112 diff -rupN linux-2.4.32/include/asm-ppc/spinlock.h linux-2.4.32.more-gcc4-fixes-v1/include/asm-ppc/spinlock.h
1113 --- linux-2.4.32/include/asm-ppc/spinlock.h     2003-06-14 13:30:28.000000000 +0200
1114 +++ linux-2.4.32.more-gcc4-fixes-v1/include/asm-ppc/spinlock.h  2005-11-17 13:31:16.000000000 +0100
1115 @@ -40,7 +40,6 @@ typedef struct {
1116  extern void _spin_lock(spinlock_t *lock);
1117  extern void _spin_unlock(spinlock_t *lock);
1118  extern int spin_trylock(spinlock_t *lock);
1119 -extern unsigned long __spin_trylock(volatile unsigned long *lock);
1120  
1121  #define spin_lock(lp)                  _spin_lock(lp)
1122  #define spin_unlock(lp)                        _spin_unlock(lp)
1123 diff -rupN linux-2.4.32/include/linux/fsfilter.h linux-2.4.32.more-gcc4-fixes-v1/include/linux/fsfilter.h
1124 --- linux-2.4.32/include/linux/fsfilter.h       2004-11-17 18:36:42.000000000 +0100
1125 +++ linux-2.4.32.more-gcc4-fixes-v1/include/linux/fsfilter.h    2005-11-17 13:31:16.000000000 +0100
1126 @@ -70,7 +70,6 @@ struct filter_fs {
1127  #define FILTER_FS_XFS 3
1128  #define FILTER_FS_OBDFS 4
1129  #define FILTER_FS_TMPFS 5
1130 -extern struct filter_fs filter_oppar[FILTER_FS_TYPES];
1131  
1132  struct filter_fs *filter_get_filter_fs(const char *cache_type);
1133  void filter_setup_journal_ops(struct filter_fs *ops, char *cache_type);
1134 diff -rupN linux-2.4.32/include/linux/generic_serial.h linux-2.4.32.more-gcc4-fixes-v1/include/linux/generic_serial.h
1135 --- linux-2.4.32/include/linux/generic_serial.h 2002-02-26 13:26:58.000000000 +0100
1136 +++ linux-2.4.32.more-gcc4-fixes-v1/include/linux/generic_serial.h      2005-11-17 13:31:16.000000000 +0100
1137 @@ -98,6 +98,4 @@ int  gs_setserial(struct gs_port *port, 
1138  int  gs_getserial(struct gs_port *port, struct serial_struct *sp);
1139  void gs_got_break(struct gs_port *port);
1140  
1141 -extern int gs_debug;
1142 -
1143  #endif
1144 diff -rupN linux-2.4.32/include/linux/i2c.h linux-2.4.32.more-gcc4-fixes-v1/include/linux/i2c.h
1145 --- linux-2.4.32/include/linux/i2c.h    2005-06-01 18:02:21.000000000 +0200
1146 +++ linux-2.4.32.more-gcc4-fixes-v1/include/linux/i2c.h 2005-11-17 13:31:16.000000000 +0100
1147 @@ -70,7 +70,7 @@ extern int i2c_master_recv(struct i2c_cl
1148  
1149  /* Transfer num messages.
1150   */
1151 -extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
1152 +extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg,int num);
1153  
1154  /*
1155   * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor. 
1156 @@ -197,7 +197,7 @@ struct i2c_algorithm {
1157            to NULL. If an adapter algorithm can do SMBus access, set 
1158            smbus_xfer. If set to NULL, the SMBus protocol is simulated
1159            using common I2C messages */
1160 -       int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[], 
1161 +       int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,
1162                            int num);
1163         int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, 
1164                            unsigned short flags, char read_write,
1165 diff -rupN linux-2.4.32/include/linux/intermezzo_fs.h linux-2.4.32.more-gcc4-fixes-v1/include/linux/intermezzo_fs.h
1166 --- linux-2.4.32/include/linux/intermezzo_fs.h  2005-01-19 18:00:53.000000000 +0100
1167 +++ linux-2.4.32.more-gcc4-fixes-v1/include/linux/intermezzo_fs.h       2005-11-17 13:31:16.000000000 +0100
1168 @@ -321,7 +321,6 @@ int presto_fwrite(struct file *file, con
1169  int presto_ispresto(struct inode *);
1170  
1171  /* super.c */
1172 -extern struct file_system_type presto_fs_type;
1173  extern int init_intermezzo_fs(void);
1174  
1175  /* fileset.c */
1176 diff -rupN linux-2.4.32/include/linux/nbd.h linux-2.4.32.more-gcc4-fixes-v1/include/linux/nbd.h
1177 --- linux-2.4.32/include/linux/nbd.h    2002-08-07 00:52:26.000000000 +0200
1178 +++ linux-2.4.32.more-gcc4-fixes-v1/include/linux/nbd.h 2005-11-17 13:31:16.000000000 +0100
1179 @@ -29,34 +29,6 @@
1180  
1181  #include <linux/blk.h>
1182  
1183 -#ifdef PARANOIA
1184 -extern int requests_in;
1185 -extern int requests_out;
1186 -#endif
1187 -
1188 -static void
1189 -nbd_end_request(struct request *req)
1190 -{
1191 -       struct buffer_head *bh;
1192 -       unsigned nsect;
1193 -       unsigned long flags;
1194 -       int uptodate = (req->errors == 0) ? 1 : 0;
1195 -
1196 -#ifdef PARANOIA
1197 -       requests_out++;
1198 -#endif
1199 -       spin_lock_irqsave(&io_request_lock, flags);
1200 -       while((bh = req->bh) != NULL) {
1201 -               nsect = bh->b_size >> 9;
1202 -               blk_finished_io(nsect);
1203 -               req->bh = bh->b_reqnext;
1204 -               bh->b_reqnext = NULL;
1205 -               bh->b_end_io(bh, uptodate);
1206 -       }
1207 -       blkdev_release_request(req);
1208 -       spin_unlock_irqrestore(&io_request_lock, flags);
1209 -}
1210 -
1211  #define MAX_NBD 128
1212  
1213  struct nbd_device {
1214 diff -rupN linux-2.4.32/include/net/irda/irlan_event.h linux-2.4.32.more-gcc4-fixes-v1/include/net/irda/irlan_event.h
1215 --- linux-2.4.32/include/net/irda/irlan_event.h 1999-03-09 11:36:02.000000000 +0100
1216 +++ linux-2.4.32.more-gcc4-fixes-v1/include/net/irda/irlan_event.h      2005-11-17 13:31:16.000000000 +0100
1217 @@ -67,8 +67,6 @@ typedef enum {
1218         IRLAN_WATCHDOG_TIMEOUT,
1219  } IRLAN_EVENT;
1220  
1221 -extern char *irlan_state[];
1222 -
1223  void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event, 
1224                            struct sk_buff *skb);
1225  
1226 diff -rupN linux-2.4.32/include/net/irda/irttp.h linux-2.4.32.more-gcc4-fixes-v1/include/net/irda/irttp.h
1227 --- linux-2.4.32/include/net/irda/irttp.h       2003-06-14 13:30:29.000000000 +0200
1228 +++ linux-2.4.32.more-gcc4-fixes-v1/include/net/irda/irttp.h    2005-11-17 13:31:16.000000000 +0100
1229 @@ -209,6 +209,4 @@ static inline int irttp_is_primary(struc
1230         return(irlap_is_primary(self->lsap->lap->irlap));
1231  }
1232  
1233 -extern struct irttp_cb *irttp;
1234 -
1235  #endif /* IRTTP_H */
1236 diff -rupN linux-2.4.32/include/net/irda/qos.h linux-2.4.32.more-gcc4-fixes-v1/include/net/irda/qos.h
1237 --- linux-2.4.32/include/net/irda/qos.h 2001-07-21 11:47:34.000000000 +0200
1238 +++ linux-2.4.32.more-gcc4-fixes-v1/include/net/irda/qos.h      2005-11-17 13:31:16.000000000 +0100
1239 @@ -83,7 +83,6 @@ struct qos_info {
1240  extern int sysctl_max_baud_rate;
1241  extern int sysctl_max_inactive_time;
1242  
1243 -extern __u32 baud_rates[];
1244  extern __u32 data_sizes[];
1245  extern __u32 min_turn_times[];
1246  extern __u32 add_bofs[];
1247 diff -rupN linux-2.4.32/include/net/udp.h linux-2.4.32.more-gcc4-fixes-v1/include/net/udp.h
1248 --- linux-2.4.32/include/net/udp.h      2005-01-19 18:00:53.000000000 +0100
1249 +++ linux-2.4.32.more-gcc4-fixes-v1/include/net/udp.h   2005-11-17 13:31:16.000000000 +0100
1250 @@ -25,6 +25,7 @@
1251  #include <linux/udp.h>
1252  #include <linux/poll.h>
1253  #include <net/sock.h>
1254 +#include <net/snmp.h>
1255  
1256  #define UDP_HTABLE_SIZE                128
1257  
1258 diff -rupN linux-2.4.32/net/ipv6/ip6_fib.c linux-2.4.32.more-gcc4-fixes-v1/net/ipv6/ip6_fib.c
1259 --- linux-2.4.32/net/ipv6/ip6_fib.c     2005-11-17 13:27:30.000000000 +0100
1260 +++ linux-2.4.32.more-gcc4-fixes-v1/net/ipv6/ip6_fib.c  2005-11-17 13:31:16.000000000 +0100
1261 @@ -95,7 +95,7 @@ static __u32  rt_sernum       = 0;
1262  
1263  static struct timer_list ip6_fib_timer = { function: fib6_run_gc };
1264  
1265 -static struct fib6_walker_t fib6_walker_list = {
1266 +struct fib6_walker_t fib6_walker_list = {
1267         &fib6_walker_list, &fib6_walker_list, 
1268  };
1269  
1270 diff -rupN linux-2.4.32/net/ipv6/sysctl_net_ipv6.c linux-2.4.32.more-gcc4-fixes-v1/net/ipv6/sysctl_net_ipv6.c
1271 --- linux-2.4.32/net/ipv6/sysctl_net_ipv6.c     2004-04-14 20:22:21.000000000 +0200
1272 +++ linux-2.4.32.more-gcc4-fixes-v1/net/ipv6/sysctl_net_ipv6.c  2005-11-17 13:31:16.000000000 +0100
1273 @@ -31,17 +31,14 @@ ctl_table ipv6_table[] = {
1274  
1275  #ifdef MODULE
1276  static struct ctl_table_header *ipv6_sysctl_header;
1277 -static struct ctl_table ipv6_root_table[];
1278 -static struct ctl_table ipv6_net_table[];
1279  
1280 -
1281 -ctl_table ipv6_root_table[] = {
1282 -       {CTL_NET, "net", NULL, 0, 0555, ipv6_net_table},
1283 +static ctl_table ipv6_net_table[] = {
1284 +       {NET_IPV6, "ipv6", NULL, 0, 0555, ipv6_table},
1285          {0}
1286  };
1287  
1288 -ctl_table ipv6_net_table[] = {
1289 -       {NET_IPV6, "ipv6", NULL, 0, 0555, ipv6_table},
1290 +static ctl_table ipv6_root_table[] = {
1291 +       {CTL_NET, "net", NULL, 0, 0555, ipv6_net_table},
1292          {0}
1293  };
1294  
1295 diff -rupN linux-2.4.32/net/irda/qos.c linux-2.4.32.more-gcc4-fixes-v1/net/irda/qos.c
1296 --- linux-2.4.32/net/irda/qos.c 2003-11-29 00:28:15.000000000 +0100
1297 +++ linux-2.4.32.more-gcc4-fixes-v1/net/irda/qos.c      2005-11-17 13:31:16.000000000 +0100
1298 @@ -97,7 +97,7 @@ static int irlap_param_min_turn_time(voi
1299                                      int get);
1300  
1301  __u32 min_turn_times[]  = { 10000, 5000, 1000, 500, 100, 50, 10, 0 }; /* us */
1302 -__u32 baud_rates[]      = { 2400, 9600, 19200, 38400, 57600, 115200, 576000, 
1303 +static __u32 baud_rates[] = { 2400, 9600, 19200, 38400, 57600, 115200, 576000, 
1304                             1152000, 4000000, 16000000 };           /* bps */
1305  __u32 data_sizes[]      = { 64, 128, 256, 512, 1024, 2048 };        /* bytes */
1306  __u32 add_bofs[]        = { 48, 24, 12, 5, 3, 2, 1, 0 };            /* bytes */
1307 diff -rupN linux-2.4.32/net/khttpd/prototypes.h linux-2.4.32.more-gcc4-fixes-v1/net/khttpd/prototypes.h
1308 --- linux-2.4.32/net/khttpd/prototypes.h        2001-08-16 23:47:03.000000000 +0200
1309 +++ linux-2.4.32.more-gcc4-fixes-v1/net/khttpd/prototypes.h     2005-11-17 13:31:16.000000000 +0100
1310 @@ -49,7 +49,6 @@ extern int sysctl_khttpd_stop;
1311  extern struct khttpd_threadinfo threadinfo[CONFIG_KHTTPD_NUMCPU];
1312  extern char CurrentTime[];
1313  extern atomic_t ConnectCount;
1314 -extern struct wait_queue main_wait[CONFIG_KHTTPD_NUMCPU];
1315  
1316  /* misc.c */
1317