Skip to contentSkip to conversation

net: axienet: Fix fall-through warning for Clang

PATCH Applied Gustavo A. R. Silva 3 participants 3 messages May 28, 2021 – Jun 1, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: axienet: Fix fall-through warning for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a fallthrough statement instead of just letting the code fall through to the next case.

---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 25 in linux-next. This is one of those last remaining warnings.

 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +1 -0
index b508c9453f40..e29ad9a86a3c 100644
@@ -1543,6 +1543,7 @@ static void axienet_validate(struct phylink_config *config,
 	case PHY_INTERFACE_MODE_MII:
 		phylink_set(mask, 100baseT_Full);
 		phylink_set(mask, 10baseT_Full);
+		fallthrough;
 	default:
 		break;
 	}
Signature · 1 line
2.27.0
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Fri, 28 May 2021 14:58:31 -0500 you wrote:

In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a fallthrough statement instead of just letting the code fall through to the next case.

[...]

Here is the summary with links:
- [next] net: axienet: Fix fall-through warning for Clang

    https://git.kernel.org/netdev/net-next/c/03a6ef31f2bc

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel