Skip to content

Commit 0a32788

Browse files
arndbdavem330
authored andcommitted
cxgb4: hide unused warnings
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: 96fe11f ("cxgb4: Implement ndo_get_phys_port_id for mgmt dev") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a1a22c1 commit 0a32788

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4643,7 +4643,9 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
46434643
u32 whoami, pl_rev;
46444644
enum chip_type chip;
46454645
static int adap_idx = 1;
4646+
#ifdef CONFIG_PCI_IOV
46464647
u32 v, port_vec;
4648+
#endif
46474649

46484650
printk_once(KERN_INFO "%s - version %s\n", DRV_DESC, DRV_VERSION);
46494651

0 commit comments

Comments
 (0)