mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2.4 patch] fix two pcmcia/cardbus.c compile warnings
@ 2003-12-19 22:31 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2003-12-19 22:31 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel, dahinds

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;
 	


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-19 22:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-19 22:31 [2.4 patch] fix two pcmcia/cardbus.c compile warnings Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®