From: Arnd Bergmann <arnd@arndb.de>
To: netdev@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
"David S. Miller" <davem@davemloft.net>,
Robert Jarzmik <robert.jarzmik@free.fr>,
linux-kernel@vger.kernel.org
Subject: [PATCH] net: smc911x: avoid unused variable warnings
Date: Mon, 21 Mar 2016 09:30:59 +0100 [thread overview]
Message-ID: <1458549072-1914517-1-git-send-email-arnd@arndb.de> (raw)
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
next reply other threads:[~2016-03-21 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 8:30 Arnd Bergmann [this message]
2016-03-21 15:27 ` [PATCH] net: smc911x: avoid unused variable warnings David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458549072-1914517-1-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox