Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: smc911x: avoid unused variable warnings

The change to use the generic DMA engine API in the smc911x
driver has led to a harmless warning about unused local variables:

smsc/smc911x.c: In function 'smc911x_probe':
smsc/smc911x.c:1796:20: error: unused variable 'param'
smsc/smc911x.c:1795:17: error: unused variable 'mask'
smsc/smc911x.c:1794:26: error: unused variable 'config'

This puts the variable declarations inside of the same #ifdef
that protects their use.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 79d3b59a93ba ("net: smc911x: convert pxa dma to dmaengine")
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Arnd Bergmann and committed by
David S. Miller
abc34d75 1c191307

+2
+2
drivers/net/ethernet/smsc/smc911x.c
··· 1791 1791 unsigned int val, chip_id, revision; 1792 1792 const char *version_string; 1793 1793 unsigned long irq_flags; 1794 + #ifdef SMC_USE_DMA 1794 1795 struct dma_slave_config config; 1795 1796 dma_cap_mask_t mask; 1796 1797 struct pxad_param param; 1798 + #endif 1797 1799 1798 1800 DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__); 1799 1801