]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4: hide unused warnings
authorArnd Bergmann <arnd@arndb.de>
Wed, 18 Jan 2017 14:52:51 +0000 (15:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jan 2017 16:16:57 +0000 (11:16 -0500)
commitebfc1cbc06081c1fc2d2d84a2c80f97f1b377f04
treec4606ac49e8cc8c08f54ac033ba92ab746a99443
parenta71dff64dc011c16259f7b29eeb92bcf19b34767
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: 4bbe83995a2e ("cxgb4: Implement ndo_get_phys_port_id for mgmt dev")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c