[PATCH] net: ethernet: bgmac: mark expected switch fall-through

Subsystems: broadcom iproc gbit ethernet driver, networking drivers, the rest

STALE3201d

2 messages, 2 authors, 2017-11-11 · open the first message on its own page

[PATCH] net: ethernet: bgmac: mark expected switch fall-through

From: Gustavo A. R. Silva <hidden>
Date: 2017-11-08 17:25:13

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1397972
Signed-off-by: Gustavo A. R. Silva <redacted>
---
 drivers/net/ethernet/broadcom/bgmac-platform.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/broadcom/bgmac-platform.c b/drivers/net/ethernet/broadcom/bgmac-platform.c
index d937083d..894eda5 100644
--- a/drivers/net/ethernet/broadcom/bgmac-platform.c
+++ b/drivers/net/ethernet/broadcom/bgmac-platform.c
@@ -131,6 +131,7 @@ static void bgmac_nicpm_speed_set(struct net_device *net_dev)
 	switch (bgmac->net_dev->phydev->speed) {
 	default:
 		netdev_err(net_dev, "Unsupported speed. Defaulting to 1000Mb\n");
+		/* fall through */
 	case SPEED_1000:
 		val |= NICPM_IOMUX_CTRL_SPD_1000M << NICPM_IOMUX_CTRL_SPD_SHIFT;
 		break;
-- 
2.7.4

Re: [PATCH] net: ethernet: bgmac: mark expected switch fall-through

From: David Miller <davem@davemloft.net>
Date: 2017-11-11 09:49:46

From: "Gustavo A. R. Silva" <redacted>
Date: Wed, 8 Nov 2017 11:24:57 -0600
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1397972
Signed-off-by: Gustavo A. R. Silva <redacted>
Applied to net-next.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help