aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-05-29 08:39:28 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-06-11 22:06:31 -0400
commit0c1aa20fb87b796d904f4d89ad12e5a0c483127b (patch)
tree4aba71e2ac7a4ebdc000f55459b0c1412b7b6b7f
parenta5136e23b54250f4082130f3dd6f5cb6c54bc7d5 (diff)
[netdrvr] Fix 8390 build breakage
From: tony@bakeyournoodle.com (Tony Breeds) The commit 3f8cb098859bbea29d7b3765a3102e4a6bf81b85 (drivers/net/lib8390: fix warning, trim trailing whitespace) removed ei_local from ei_tx_err() and ei_rx_overrun() resulting in the following build errors on m68k and sh: Using /scratch1/tony/next as source for kernel GEN /scratch1/tony/next_out/Makefile CHK include/linux/version.h CHK include/linux/utsrelease.h CALL /scratch1/tony/next/scripts/checksyscalls.sh CHK include/linux/compile.h CC [M] drivers/net/zorro8390.o In file included from /scratch1/tony/next/drivers/net/zorro8390.c:47: drivers/net/lib8390.c: In function 'ei_tx_err': drivers/net/lib8390.c:556: error: 'ei_local' undeclared (first use in this function) drivers/net/lib8390.c:556: error: (Each undeclared identifier is reported only once drivers/net/lib8390.c:556: error: for each function it appears in.) drivers/net/lib8390.c: In function 'ei_rx_overrun': drivers/net/lib8390.c:823: error: 'ei_local' undeclared (first use in this function) make[3]: *** [drivers/net/zorro8390.o] Error 1 make[2]: *** [drivers/net] Error 2 make[1]: *** [drivers] Error 2 make: *** [sub-make] Error 2 The problem is that ei_inb_p() is using various #defines (from drivers/net/8390.h) that use EI_SHIFT, which in some drivers on some architectures use ei_local. Tag ei_local as "__maybe_unused" to keep it around and keep the warnings the original commit is trying to silence ... silenced. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/net/lib8390.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index ed495275b577..00d59ab2f8ac 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -553,6 +553,8 @@ static void __ei_poll(struct net_device *dev)
553static void ei_tx_err(struct net_device *dev) 553static void ei_tx_err(struct net_device *dev)
554{ 554{
555 unsigned long e8390_base = dev->base_addr; 555 unsigned long e8390_base = dev->base_addr;
556 /* ei_local is used on some platforms via the EI_SHIFT macro */
557 struct ei_device *ei_local __maybe_unused = netdev_priv(dev);
556 unsigned char txsr = ei_inb_p(e8390_base+EN0_TSR); 558 unsigned char txsr = ei_inb_p(e8390_base+EN0_TSR);
557 unsigned char tx_was_aborted = txsr & (ENTSR_ABT+ENTSR_FU); 559 unsigned char tx_was_aborted = txsr & (ENTSR_ABT+ENTSR_FU);
558 560
@@ -815,6 +817,8 @@ static void ei_rx_overrun(struct net_device *dev)
815{ 817{
816 unsigned long e8390_base = dev->base_addr; 818 unsigned long e8390_base = dev->base_addr;
817 unsigned char was_txing, must_resend = 0; 819 unsigned char was_txing, must_resend = 0;
820 /* ei_local is used on some platforms via the EI_SHIFT macro */
821 struct ei_device *ei_local __maybe_unused = netdev_priv(dev);
818 822
819 /* 823 /*
820 * Record whether a Tx was in progress and then issue the 824 * Record whether a Tx was in progress and then issue the