linux/drivers/net/ethernet/apm/xgene
Arnd Bergmann ea966cb6b9 net: xgene: fix maybe-uninitialized variable
Building with -Wmaybe-uninitialized shows a potential use of
an uninitialized variable:

drivers/net/ethernet/apm/xgene/xgene_enet_hw.c: In function 'xgene_enet_phy_connect':
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:802:23: warning: 'phy_dev' may be used uninitialized in this function [-Wmaybe-uninitialized]

Although the compiler correctly identified this based on the function,
the current code is still safe as long dev->of_node is non-NULL
for the case of CONFIG_ACPI=n, which is currently the case.

The warning is now disabled by default, but still appears when
building with W=1, and other build test tools should be able to
detect it as well. Adding an #else clause here makes the code
more robust and makes it clear to the compiler that this cannot
happen.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8089a96f60 ("drivers: net: xgene: Add backward compatibility")
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-03 11:52:16 -07:00
..
Kconfig drivers: net: xgene: Enable MDIO driver 2016-07-25 21:51:43 -07:00
Makefile drivers: net: xgene: Add support for Classifier engine 2016-02-17 22:08:34 -05:00
xgene_enet_cle.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-05-15 13:32:48 -04:00
xgene_enet_cle.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-05-15 13:32:48 -04:00
xgene_enet_ethtool.c drivers: net: xgene: ethtool: Use phy_ethtool_gset and sset 2016-07-25 21:51:43 -07:00
xgene_enet_hw.c net: xgene: fix maybe-uninitialized variable 2016-08-03 11:52:16 -07:00
xgene_enet_hw.h drivers: net: xgene: Add backward compatibility 2016-07-25 21:51:43 -07:00
xgene_enet_main.c drivers: net: xgene: Enable MDIO driver 2016-07-25 21:51:43 -07:00
xgene_enet_main.h drivers: net: xgene: Add backward compatibility 2016-07-25 21:51:43 -07:00
xgene_enet_ring2.c drivers: net: xgene: Add support for multiple queues 2016-02-17 22:08:34 -05:00
xgene_enet_ring2.h drivers: net: xgene: Add ring manager v2 functions 2015-04-30 16:03:13 -04:00
xgene_enet_sgmac.c drivers: net: xgene: Add backward compatibility 2016-07-25 21:51:43 -07:00
xgene_enet_sgmac.h drivers: net: xgene: Fix module unload crash - clkrst sequence 2016-07-25 21:51:43 -07:00
xgene_enet_xgmac.c drivers: net: xgene: Fix module unload crash - clkrst sequence 2016-07-25 21:51:43 -07:00
xgene_enet_xgmac.h drivers: net: xgene: Separate set_speed from mac_init 2016-07-25 21:51:42 -07:00