diff options
author | Arnd Bergmann <[email protected]> | 2016-08-26 17:25:46 +0200 |
---|---|---|
committer | David S. Miller <[email protected]> | 2016-08-29 00:29:46 -0400 |
commit | f9dc70744dc74bc9e128d579f2bc85eb7c0ad8ce (patch) | |
tree | 383547a7ec0f4c697b560821a2e4c23fbb0e409b /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | 5711a98221443aec54c4c81ee98c6ae46acccb65 (diff) |
net/xgene: fix error handling during reset
The newly added reset logic uses helper functions for the MMIO that
may fail. However, when the read operation fails, we end up writing
back uninitialized data to the register, as gcc warns:
drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c: In function 'xgene_enet_link_state':
drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:213:2: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:209:6: note: 'data' was declared here
u32 data;
We already print a warning to the console log if that happens,
the best alternative that I can see is skip the rest of the reset
sequence if the register value cannot be read: Most likely the
write would fail as well, and if it succeeded, worse things could
happen.
Signed-off-by: Arnd Bergmann <[email protected]>
Fixes: 3eb7cb9dc946 ("drivers: net: xgene: XFI PCS reset when link is down")
Cc: Fushen Chen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions