Skip to contentSkip to conversation

net: wan: sdla: Mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Jul 29, 2019

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

PATCH 1/1 net: wan: sdla: Mark expected switch fall-through

Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: i386):

drivers/net/wan/sdla.c: In function ‘sdla_errors’:
drivers/net/wan/sdla.c:414:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

    if (cmd == SDLA_INFORMATION_WRITE)
       ^

drivers/net/wan/sdla.c:417:3: note: here
default:
^~~~~~~

---
 drivers/net/wan/sdla.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wan/sdla.c +1 -0
index a9ac3f37b904..e2e679a01b65 100644
@@ -413,6 +413,7 @@ static void sdla_errors(struct net_device *dev, int cmd, int dlci, int ret, int
 		case SDLA_RET_NO_BUFS:
 			if (cmd == SDLA_INFORMATION_WRITE)
 				break;
+			/* Else, fall through */
 
 		default: 
 			netdev_dbg(dev, "Cmd 0x%02X generated return code 0x%02X\n",
Signature · 1 line
2.22.0
maintainer Applied
#1 lore raw

From: "Gustavo A. R. Silva" <[email protected]>
Date: Mon, 29 Jul 2019 15:01:39 -0500

Quoted 6 lines

Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: i386):

drivers/net/wan/sdla.c: In function ‘sdla_errors’:
drivers/net/wan/sdla.c:414:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

Quoted 7 lines
    if (cmd == SDLA_INFORMATION_WRITE)
       ^
drivers/net/wan/sdla.c:417:3: note: here
   default:
   ^~~~~~~

Applied.