net: smc911x: avoid unused variable warnings
authorArnd Bergmann <arnd@arndb.de>
Mon, 21 Mar 2016 08:30:59 +0000 (09:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Mar 2016 15:26:12 +0000 (11:26 -0400)
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>
drivers/net/ethernet/smsc/smc911x.c

index 3f57110614321c8ceee1bd309726091e2a897b0b..a733868a43aa893aa6246bbef5ff6d76a52b091e 100644 (file)
@@ -1791,9 +1791,11 @@ static int smc911x_probe(struct net_device *dev)
        unsigned int val, chip_id, revision;
        const char *version_string;
        unsigned long irq_flags;
+#ifdef SMC_USE_DMA
        struct dma_slave_config config;
        dma_cap_mask_t mask;
        struct pxad_param param;
+#endif
 
        DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__);