Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1361619 > unrolled thread

[PATCH] net: smc911x: avoid unused variable warnings

Started byArnd Bergmann <arnd@arndb.de>
First post2016-03-21 09:50 +0100
Last post2016-03-21 16:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] net: smc911x: avoid unused variable warnings Arnd Bergmann <arnd@arndb.de> - 2016-03-21 09:50 +0100
    Re: [PATCH] net: smc911x: avoid unused variable warnings David Miller <davem@davemloft.net> - 2016-03-21 16:30 +0100

#1361619 — [PATCH] net: smc911x: avoid unused variable warnings

FromArnd Bergmann <arnd@arndb.de>
Date2016-03-21 09:50 +0100
Subject[PATCH] net: smc911x: avoid unused variable warnings
Message-ID<rf3Hc-337-25@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1361934

FromDavid Miller <davem@davemloft.net>
Date2016-03-21 16:30 +0100
Message-ID<rf9Wi-7Az-17@gated-at.bofh.it>
In reply to#1361619
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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web