lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1458549072-1914517-1-git-send-email-arnd@arndb.de>
Date:	Mon, 21 Mar 2016 09:30:59 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	netdev@...r.kernel.org
Cc:	Arnd Bergmann <arnd@...db.de>,
	"David S. Miller" <davem@...emloft.net>,
	Robert Jarzmik <robert.jarzmik@...e.fr>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...db.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ