Eliminate more compiler warnings...
PATCH 1/1 Eliminate more compiler warnings...
Please apply this too. Thanks.
-Steve
Signature · 1 line
Steven J. Hill - Embedded SW Engineer
arch/mips/kernel/irq.c +3 -1
@@ -25,6 +25,8 @@#include <asm/system.h> #include <asm/uaccess.h> +static void register_irq_proc (unsigned int irq); +/* * Controller mappings for all interrupt sources: */
@@ -98,7 +100,7 @@ p +=sprintf (p,", %s" , action->name); *p++ ='\n' ; } - p +=sprintf (p,"ERR: %10lu\n" , irq_err_count); + p +=sprintf (p,"ERR: %10u\n" ,atomic_read (&irq_err_count));return p - buf; }
drivers/ide/ide-probe.c +3 -3
@@ -720,9 +720,9 @@#if !defined(__mc68000__) && !defined(CONFIG_APUS ) && !defined(__sparc__)printk ("%s at 0x%03x-0x%03x,0x%03x on irq %d" , hwif->name, - hwif->io_ports[IDE_DATA_OFFSET ], - hwif->io_ports[IDE_DATA_OFFSET ]+7 , - hwif->io_ports[IDE_CONTROL_OFFSET ], hwif->irq); + (unsigned int ) hwif->io_ports[IDE_DATA_OFFSET ], + (unsigned int ) hwif->io_ports[IDE_DATA_OFFSET ]+7 , + (unsigned int ) hwif->io_ports[IDE_CONTROL_OFFSET ], hwif->irq);#elif defined(__sparc__) printk("%s at 0x%03lx-0x%03lx,0x%03lx on irq %s", hwif->name, hwif->io_ports[IDE_DATA_OFFSET],
drivers/pci/pci.ids +2 -2
@@ -1392,7 +1392,7 @@ 109e Brooktree Corporation 0350 Bt848 TV with DMA push 0351 Bt849A Video capture - 036c Bt879(??) Video Capture + 036c Bt879[??] Video Capture 13e9 0070 Win/TV (Video Section) 036e Bt878 0070 13eb WinTV/GO
@@ -4656,7 +4656,7 @@ 270b Xantel Corporation 270f Chaintech Computer Co. Ltd 2711 AVID Technology Inc. -2a15 3D Vision(???) +2a15 3D Vision[???] 3000 Hansol Electronics Inc. 3142 Post Impression Systems. 3388 Hint Corp
drivers/pci/proc.c +2 -1
@@ -200,7 +200,7 @@static int proc_bus_pci_ioctl (struct inode *inode,struct file *file,unsigned int cmd,unsigned long arg) {const struct proc_dir_entry *dp = inode->u.generic_ip; -struct pci_dev *dev = dp->data; +struct pci_dev *dev;#ifdef HAVE_PCI_MMAP struct pci_filp_private *fpriv = file->private_data;#endif /* HAVE_PCI_MMAP */
@@ -208,6 +208,7 @@switch (cmd) {case PCIIOC_CONTROLLER : + dev = dp->data; ret =pci_controller_num (dev);break ;
Quoted 1 line · Steven J. Hill
Please apply this too. Thanks.
[...]
drivers/ide/ide-probe.c line 725
Quoted 7 lines
printk("%s at 0x%03x-0x%03x,0x%03x on irq %d", hwif->name,drivers/ide/ide-probe.c +3
-3- hwif->io_ports[IDE_DATA_OFFSET ], - hwif->io_ports[IDE_DATA_OFFSET ]+7 , - hwif->io_ports[IDE_CONTROL_OFFSET], hwif->irq); + (unsigned int ) hwif->io_ports[IDE_DATA_OFFSET ], + (unsigned int ) hwif->io_ports[IDE_DATA_OFFSET ]+7 , + (unsigned int) hwif->io_ports[IDE_CONTROL_OFFSET], hwif->irq);
Why is it needed? hwif->io_ports[...] or ide_ioreg_t is short which gets
promoted to int due to varargs automatically.
BTW, please send patches to the list as inlined plain text if possible.
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Quoted 4 lines · Maciej W. Rozycki
Why is it needed? hwif->io_ports[...] or
ide_ioreg_tis short which gets
promoted to int due to varargs automatically.BTW, please send patches to the list as inlined plain text if possible.
And split into individual independant patches.
Ralf
Quoted 1 line · Steven J. Hill
Please apply this too. Thanks.
drivers/ide/ide-probe.c +3 -3
@@ -720,9 +720,9 @@#if !defined(__mc68000__) && !defined(CONFIG_APUS ) && !defined(__sparc__)printk ("%s at 0x%03x-0x%03x,0x%03x on irq %d" , hwif->name, - hwif->io_ports[IDE_DATA_OFFSET ], - hwif->io_ports[IDE_DATA_OFFSET ]+7 , - hwif->io_ports[IDE_CONTROL_OFFSET ], hwif->irq); + (unsigned int ) hwif->io_ports[IDE_DATA_OFFSET ], + (unsigned int ) hwif->io_ports[IDE_DATA_OFFSET ]+7 , + (unsigned int ) hwif->io_ports[IDE_CONTROL_OFFSET ], hwif->irq);#elif defined(__sparc__) printk("%s at 0x%03lx-0x%03lx,0x%03lx on irq %s", hwif->name, hwif->io_ports[IDE_DATA_OFFSET],
Wouldn't it be better to treat MIPS the same as SPARC here, so you don't need the casts? Both MIPS and SPARC define ide_ioreg_t to be unsigned long.
And perhaps the #if mess (__sparc__ is checked twice) can be cleant up a bit as well.
BTW, find include/asm-* -type f | xargs grep 'typedef.*ide_ioreg_t' shows that very few platforms define ide_ioreg_t to be unsigned short...
| include/asm-alpha/hdreg.h:typedef unsigned short ide_ioreg_t; | include/asm-arm/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-cris/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-i386/hdreg.h:typedef unsigned short ide_ioreg_t; | include/asm-ia64/hdreg.h:typedef unsigned short ide_ioreg_t; | include/asm-m68k/hdreg.h:typedef unsigned int q40ide_ioreg_t; | include/asm-m68k/hdreg.h:typedef unsigned char * ide_ioreg_t; | include/asm-mips/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-mips64/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-parisc/hdreg.h:typedef unsigned short ide_ioreg_t; | include/asm-ppc/hdreg.h:typedef unsigned int ide_ioreg_t; | include/asm-s390/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-s390x/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-sh/hdreg.h:typedef unsigned int ide_ioreg_t; | include/asm-sparc/hdreg.h:typedef unsigned long ide_ioreg_t; | include/asm-sparc64/hdreg.h:typedef unsigned long ide_ioreg_t;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds