Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1561875
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/3] cxgb4: hide unused warnings |
| Date | 2017-01-18 16:10 +0100 |
| Message-ID | <t0ZSq-5mL-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/3] cxgb4: hide unused warnings Arnd Bergmann <arnd@arndb.de> - 2017-01-18 16:10 +0100
[PATCH 3/3] bcm63xx_enet: avoid uninitialized variable warning Arnd Bergmann <arnd@arndb.de> - 2017-01-18 16:10 +0100
Re: [PATCH 3/3] bcm63xx_enet: avoid uninitialized variable warning David Miller <davem@davemloft.net> - 2017-01-20 18:00 +0100
Re: [PATCH 1/3] cxgb4: hide unused warnings David Miller <davem@davemloft.net> - 2017-01-20 17:30 +0100
csiph-web