]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: fix unused-variable warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 17 Jun 2019 13:13:03 +0000 (15:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Jun 2019 23:24:12 +0000 (16:24 -0700)
commitcbf7dacd885b8ecf40aaeeb8e1d321b3ceb623a6
tree0953669cff1ba0804673b90316269603ad8082b1
parenta8c7bd39044a4fb2a4a196c23d4a17cdf3b07a5a
net: stmmac: fix unused-variable warning

When building without CONFIG_OF, we get a harmless build warning:

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_phy_setup':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:973:22: error: unused variable 'node' [-Werror=unused-variable]
  struct device_node *node = priv->plat->phy_node;

Reword it so we always use the local variable, by making it the
fwnode pointer instead of the device_node.

Fixes: 7371d799f465 ("net: stmmac: Convert to phylink and remove phylib logic")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c