* [PATCH] net: smc911x: avoid unused variable warnings
@ 2016-03-21 8:30 Arnd Bergmann
2016-03-21 15:27 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-03-21 8:30 UTC (permalink / raw)
To: netdev; +Cc: Arnd Bergmann, David S. Miller, Robert Jarzmik, linux-kernel
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")
---
drivers/net/ethernet/smsc/smc911x.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c
index 3f5711061432..a733868a43aa 100644
--- a/drivers/net/ethernet/smsc/smc911x.c
+++ b/drivers/net/ethernet/smsc/smc911x.c
@@ -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__);
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: smc911x: avoid unused variable warnings
2016-03-21 8:30 [PATCH] net: smc911x: avoid unused variable warnings Arnd Bergmann
@ 2016-03-21 15:27 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-03-21 15:27 UTC (permalink / raw)
To: arnd; +Cc: netdev, robert.jarzmik, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 21 Mar 2016 09:30:59 +0100
> 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")
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-21 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21 8:30 [PATCH] net: smc911x: avoid unused variable warnings Arnd Bergmann
2016-03-21 15:27 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.