diff mbox

[net-next] cxgb4: Fix unused variable warning

Message ID 1484903839-5890-1-git-send-email-ganeshgr@chelsio.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Ganesh Goudar Jan. 20, 2017, 9:17 a.m. UTC
Fix unused variable warning when CONFIG_PCI_IOV is not
defined.

Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Miller Jan. 20, 2017, 4:16 p.m. UTC | #1
From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Fri, 20 Jan 2017 14:47:19 +0530

> Fix unused variable warning when CONFIG_PCI_IOV is not
> defined.
> 
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>

Arnd already submitted a fix for this, and unlike your's his provided
a proper Fixes-by: tag.

Thanks.
diff mbox

Patch

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 4da6f90..49e000e 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);