]> git.baikalelectronics.ru Git - kernel.git/commit
macb: fix build warning for !CONFIG_OF
authorArnd Bergmann <arnd@arndb.de>
Mon, 8 Jul 2019 12:48:23 +0000 (14:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jul 2019 19:43:07 +0000 (12:43 -0700)
commite869c6899628f7f07a04197f40e2aa4bf9278b38
tree9c34cb8ff0bcd8595da5a28a937fc77d3f660dc3
parentc0850f55407e264692ca1f5a48ba995ed97acf07
macb: fix build warning for !CONFIG_OF

When CONFIG_OF is disabled, we get a harmless warning about the
newly added variable:

drivers/net/ethernet/cadence/macb_main.c:48:39: error: 'mgmt' defined but not used [-Werror=unused-variable]
 static struct sifive_fu540_macb_mgmt *mgmt;

Move the variable closer to its use inside of the #ifdef.

Fixes: 170fa65c6773 ("macb: Add support for SiFive FU540-C000")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c