]> git.baikalelectronics.ru Git - kernel.git/commit
enetc: Fix unused var build warning for CONFIG_OF
authorArnd Bergmann <arnd@arndb.de>
Fri, 4 Dec 2020 12:08:00 +0000 (14:08 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 5 Dec 2020 22:56:23 +0000 (14:56 -0800)
commit5170d5dad694c4753ab893fdd4d3ebdab79e5f48
treed392b09cfe9a48d38a31a09c6447c01658632769
parent522a6dc2376f23a46fcb78020476853ee55e4372
enetc: Fix unused var build warning for CONFIG_OF

When CONFIG_OF is disabled, there is a harmless warning about
an unused variable:

enetc_pf.c: In function 'enetc_phylink_create':
enetc_pf.c:981:17: error: unused variable 'dev' [-Werror=unused-variable]

Slightly rearrange the code to pass around the of_node as a
function argument, which avoids the problem without hurting
readability.

Fixes: eba4892dae41 ("enetc: Migrate to PHYLINK and PCS_LYNX")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Link: https://lore.kernel.org/r/20201204120800.17193-1-claudiu.manoil@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc_pf.c