[2.4 patch] fix two pcmcia/cardbus.c compile warnings
From: Adrian Bunk
Date: Fri Dec 19 2003 - 17:32:27 EST
I got the following compile warnings in 2.4.24-pre1:
<-- snip -->
...
gcc -D__KERNEL__ -I/tmp/linux-2.4.24-pre1/include -Wall
-Wstrict-prototypes -Wn\
o-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
-pipe -mp\
referred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include
-DKBUILD\
_BASENAME=cardbus -c -o cardbus.o cardbus.c
cardbus.c: In function `cb_scan_slot':
...
cardbus.c:226: warning: unused variable `bus'
cardbus.c: In function `program_bridge':
cardbus.c:405: warning: control reaches end of non-void function
...
<-- snip -->
The patch below does the following:
- remove the unused variable
- make the function without return void (the only caller doesn't check
the return value)
Please apply
Adrian
--- linux-2.4.24-pre1/drivers/pcmcia/cardbus.c.old 2003-12-19 21:35:52.000000000 +0100
+++ linux-2.4.24-pre1/drivers/pcmcia/cardbus.c 2003-12-19 21:36:49.000000000 +0100
@@ -223,7 +223,6 @@
struct pci_dev *cb_scan_slot(struct pci_dev *temp, struct list_head *list)
{
- struct pci_bus *bus = temp->bus;
struct pci_dev *dev;
struct pci_dev *first_dev = NULL;
int func = 0;
@@ -369,7 +368,7 @@
return max;
}
-static int program_bridge(struct pci_dev *bridge)
+static void program_bridge(struct pci_dev *bridge)
{
u32 l;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/