* [PATCH] Eliminate more compiler warnings...
@ 2002-02-07 15:57 Steven J. Hill
2002-02-07 16:18 ` Maciej W. Rozycki
2002-02-07 16:27 ` Geert Uytterhoeven
0 siblings, 2 replies; 4+ messages in thread
From: Steven J. Hill @ 2002-02-07 15:57 UTC (permalink / raw)
To: ralf, linux-mips
[-- Attachment #1: Type: text/plain, Size: 82 bytes --]
Please apply this too. Thanks.
-Steve
--
Steven J. Hill - Embedded SW Engineer
[-- Attachment #2: mipslinux-20020207p2.diff --]
[-- Type: application/octet-stream, Size: 2844 bytes --]
diff -urN -X cvs-exc.txt mipslinux-2.4.17-xfs/arch/mips/kernel/irq.c settop/arch/mips/kernel/irq.c
--- mipslinux-2.4.17-xfs/arch/mips/kernel/irq.c Tue Dec 18 00:04:00 2001
+++ settop/arch/mips/kernel/irq.c Thu Feb 7 09:05:04 2002
@@ -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;
}
diff -urN -X cvs-exc.txt mipslinux-2.4.17-xfs/drivers/ide/ide-probe.c settop/drivers/ide/ide-probe.c
--- mipslinux-2.4.17-xfs/drivers/ide/ide-probe.c Sun Dec 2 06:08:03 2001
+++ settop/drivers/ide/ide-probe.c Tue Jan 29 14:06:39 2002
@@ -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],
diff -urN -X cvs-exc.txt mipslinux-2.4.17-xfs/drivers/pci/pci.ids settop/drivers/pci/pci.ids
--- mipslinux-2.4.17-xfs/drivers/pci/pci.ids Sun Dec 2 05:34:45 2001
+++ settop/drivers/pci/pci.ids Thu Feb 7 09:34:19 2002
@@ -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
diff -urN -X cvs-exc.txt mipslinux-2.4.17-xfs/drivers/pci/proc.c settop/drivers/pci/proc.c
--- mipslinux-2.4.17-xfs/drivers/pci/proc.c Sun Dec 2 05:34:45 2001
+++ settop/drivers/pci/proc.c Wed Jan 30 08:34:03 2002
@@ -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;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Eliminate more compiler warnings...
2002-02-07 15:57 [PATCH] Eliminate more compiler warnings Steven J. Hill
@ 2002-02-07 16:18 ` Maciej W. Rozycki
2002-02-07 16:48 ` Ralf Baechle
2002-02-07 16:27 ` Geert Uytterhoeven
1 sibling, 1 reply; 4+ messages in thread
From: Maciej W. Rozycki @ 2002-02-07 16:18 UTC (permalink / raw)
To: Steven J. Hill; +Cc: ralf, linux-mips
On Thu, 7 Feb 2002, Steven J. Hill wrote:
> Please apply this too. Thanks.
[...]
> 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);
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.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Eliminate more compiler warnings...
2002-02-07 16:18 ` Maciej W. Rozycki
@ 2002-02-07 16:48 ` Ralf Baechle
0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2002-02-07 16:48 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Steven J. Hill, linux-mips
On Thu, Feb 07, 2002 at 05:18:30PM +0100, Maciej W. Rozycki wrote:
> 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.
And split into individual independant patches.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Eliminate more compiler warnings...
2002-02-07 15:57 [PATCH] Eliminate more compiler warnings Steven J. Hill
2002-02-07 16:18 ` Maciej W. Rozycki
@ 2002-02-07 16:27 ` Geert Uytterhoeven
1 sibling, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2002-02-07 16:27 UTC (permalink / raw)
To: Steven J. Hill; +Cc: Ralf Baechle, Linux/MIPS Development
On Thu, 7 Feb 2002, Steven J. Hill wrote:
> Please apply this too. Thanks.
diff -urN -X cvs-exc.txt mipslinux-2.4.17-xfs/drivers/ide/ide-probe.c settop/drivers/ide/ide-probe.c
--- mipslinux-2.4.17-xfs/drivers/ide/ide-probe.c Sun Dec 2 06:08:03 2001
+++ settop/drivers/ide/ide-probe.c Tue Jan 29 14:06:39 2002
@@ -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 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-02-07 16:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-07 15:57 [PATCH] Eliminate more compiler warnings Steven J. Hill
2002-02-07 16:18 ` Maciej W. Rozycki
2002-02-07 16:48 ` Ralf Baechle
2002-02-07 16:27 ` Geert Uytterhoeven
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.