[PATCH][next] net: axienet: Fix fall-through warning for Clang

Subsystems: networking drivers, the rest, xilinx axi ethernet driver

STALE1922d LANDED

Landed in mainline as 03a6ef31f2bc on 2021-05-30.

2 messages, 2 authors, 2021-06-01 · open the first message on its own page

[PATCH][next] net: axienet: Fix fall-through warning for Clang

From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Date: 2021-05-28 19:57:36

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.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
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(+)
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index b508c9453f40..e29ad9a86a3c 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -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;
 	}
-- 
2.27.0

Re: [PATCH][next] net: axienet: Fix fall-through warning for Clang

From: Kees Cook <hidden>
Date: 2021-06-01 19:20:00

On Fri, May 28, 2021 at 02:58:31PM -0500, Gustavo A. R. Silva 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.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <redacted>

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help