Skip to contentSkip to conversation

fix two pcmcia/cardbus.c compile warnings

PATCH New Adrian Bunk 1 participant 1 message Dec 19, 2003 Pcmcia

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix two pcmcia/cardbus.c compile warnings

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

drivers/pcmcia/cardbus.c renamed from drivers/pcmcia/cardbus.c.old +1 -2
@@ -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;