summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_alb.c
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2021-08-06 12:13:40 -0700
committerDavid S. Miller <davem@davemloft.net>2021-08-07 09:45:46 +0100
commit4367355dd90942a71641c98c40c74589c9bddf90 (patch)
tree00170eac21c7f81dcc9e5e82cf580e41c3bde1d5 /drivers/net/bonding/bond_alb.c
parent709db03a8afaf5196b36e633fbaa68b42fba95d5 (diff)
net: ethernet: stmmac: Do not use unreachable() in ipq806x_gmac_probe()
When compiling with clang in certain configurations, an objtool warning appears: drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.o: warning: objtool: ipq806x_gmac_probe() falls through to next function phy_modes() This happens because the unreachable annotation in the third switch statement is not eliminated. The compiler should know that the first default case would prevent the second and third from being reached as the comment notes but sanitizer options can make it harder for the compiler to reason this out. Help the compiler out by eliminating the unreachable() annotation and unifying the default case error handling so that there is no objtool warning, the meaning of the code stays the same, and there is less duplication. Reported-by: Sami Tolvanen <samitolvanen@google.com> Tested-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
0 files changed, 0 insertions, 0 deletions