netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] cxgb4: hide unused warnings
@ 2017-01-18 14:52 Arnd Bergmann
  2017-01-18 14:52 ` [PATCH 2/3] qed: avoid possible stack overflow in qed_ll2_acquire_connection Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Arnd Bergmann @ 2017-01-18 14:52 UTC (permalink / raw)
  To: Hariprasad S
  Cc: Arnd Bergmann, David S. Miller, Ganesh Goudar, Rahul Lakkireddy,
	Varun Prakash, netdev, linux-kernel

The two new variables are only used inside of an #ifdef and cause
harmless warnings when that is disabled:

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c: In function 'init_one':
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:4646:9: error: unused variable 'port_vec' [-Werror=unused-variable]
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:4646:6: error: unused variable 'v' [-Werror=unused-variable]

This adds another #ifdef around the declarations.

Fixes: 96fe11f27b70 ("cxgb4: Implement ndo_get_phys_port_id for mgmt dev")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 4da6f900ff24..49e000ebd2b9 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -4643,7 +4643,9 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	u32 whoami, pl_rev;
 	enum chip_type chip;
 	static int adap_idx = 1;
+#ifdef CONFIG_PCI_IOV
 	u32 v, port_vec;
+#endif
 
 	printk_once(KERN_INFO "%s - version %s\n", DRV_DESC, DRV_VERSION);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-01-20 16:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-18 14:52 [PATCH 1/3] cxgb4: hide unused warnings Arnd Bergmann
2017-01-18 14:52 ` [PATCH 2/3] qed: avoid possible stack overflow in qed_ll2_acquire_connection Arnd Bergmann
2017-01-19 13:13   ` Mintz, Yuval
2017-01-20 16:44   ` David Miller
2017-01-18 14:52 ` [PATCH 3/3] bcm63xx_enet: avoid uninitialized variable warning Arnd Bergmann
2017-01-20 16:46   ` David Miller
2017-01-20 16:15 ` [PATCH 1/3] cxgb4: hide unused warnings David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).