linux/drivers/net/ethernet/apm/xgene
Arnd Bergmann f006b2c5df net: xgene: avoid bogus maybe-uninitialized warning
In some configurations, gcc cannot trace the state of variables
across a spin_unlock() barrier, leading to a warning about
correct code:

xgene_enet_main.c: In function 'xgene_enet_start_xmit':
../../../phy/mdio-xgene.h:112:14: error: 'mss_index' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Here we can trivially move the assignment before that spin_unlock,
which reliably avoids the warning.

Fixes: e3978673f5 ("drivers: net: xgene: Fix MSS programming")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-08 21:30:54 -05:00
..
Kconfig drivers: net: xgene: Poll link status via GPIO 2016-08-13 11:48:53 -07:00
Makefile drivers: net: xgene: Add support for Classifier engine 2016-02-17 22:08:34 -05:00
xgene_enet_cle.c net: xgene: move xgene_cle_ptree_ewdn data off stack 2016-12-08 21:30:54 -05:00
xgene_enet_cle.h net: xgene: move xgene_cle_ptree_ewdn data off stack 2016-12-08 21:30:54 -05:00
xgene_enet_ethtool.c drivers: net: xgene: ethtool: Add get/set_pauseparam 2016-12-03 15:46:50 -05:00
xgene_enet_hw.c drivers: net: xgene: Add flow control initialization 2016-12-03 15:46:50 -05:00
xgene_enet_hw.h drivers: net: xgene: Add flow control initialization 2016-12-03 15:46:50 -05:00
xgene_enet_main.c net: xgene: avoid bogus maybe-uninitialized warning 2016-12-08 21:30:54 -05:00
xgene_enet_main.h drivers: net: xgene: Add flow control configuration 2016-12-03 15:46:50 -05:00
xgene_enet_ring2.c drivers: net: xgene: Add support for Jumbo frame 2016-12-03 15:46:50 -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 flow control initialization 2016-12-03 15:46:50 -05: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: Add flow control initialization 2016-12-03 15:46:50 -05:00
xgene_enet_xgmac.h drivers: net: xgene: Add flow control initialization 2016-12-03 15:46:50 -05:00