Re: [PATCH] [net-next] macb: fix build warning for !CONFIG_OF

From: David Miller
Date: Mon Jul 08 2019 - 15:43:33 EST


From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Mon, 8 Jul 2019 14:48:23 +0200

> 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: c218ad559020 ("macb: Add support for SiFive FU540-C000")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Applied, thanks Arnd.