diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-10-31 01:54:45 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-02 15:50:04 -0800 |
commit | 7812e10511ce66b0f7c41d33c66c7e0db75a1016 (patch) | |
tree | 5a8b2ca4b753b24520148c3c6c85cdeba3289fcf /drivers/net/ethernet/dec | |
parent | bbbc7aa45eefd4ef7ffbd5ee3bb49bd8b68a2213 (diff) | |
download | linux-7812e10511ce66b0f7c41d33c66c7e0db75a1016.tar.gz linux-7812e10511ce66b0f7c41d33c66c7e0db75a1016.tar.bz2 linux-7812e10511ce66b0f7c41d33c66c7e0db75a1016.zip |
drivers: net: tulip: Fix set but not used with W=1
When compiled for platforms other than __i386__ or __x86_64__:
drivers/net/ethernet/dec/tulip/tulip_core.c: In function ‘tulip_init_one’:
drivers/net/ethernet/dec/tulip/tulip_core.c:1296:13: warning: variable ‘last_irq’ set but not used [-Wunused-but-set-variable]
1296 | static int last_irq;
Add more #if defined() to totally remove the code when not needed.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20201031005445.1060112-1-andrew@lunn.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/dec')
-rw-r--r-- | drivers/net/ethernet/dec/tulip/tulip_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c index e7b0d7de40fd..c1dcd6ca1457 100644 --- a/drivers/net/ethernet/dec/tulip/tulip_core.c +++ b/drivers/net/ethernet/dec/tulip/tulip_core.c @@ -1293,7 +1293,9 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) static unsigned char last_phys_addr[ETH_ALEN] = { 0x00, 'L', 'i', 'n', 'u', 'x' }; +#if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */ static int last_irq; +#endif int i, irq; unsigned short sum; unsigned char *ee_data; @@ -1617,7 +1619,9 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) for (i = 0; i < 6; i++) last_phys_addr[i] = dev->dev_addr[i]; +#if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */ last_irq = irq; +#endif /* The lower four bits are the media type. */ if (board_idx >= 0 && board_idx < MAX_UNITS) { |