netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: smc_close: mark expected switch fall-throughs
@ 2017-10-19 22:02 Gustavo A. R. Silva
  2017-10-22  1:08 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-19 22:02 UTC (permalink / raw)
  To: Ursula Braun, David S. Miller
  Cc: linux-s390, netdev, linux-kernel, Gustavo A. R. Silva

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

Notice that in this particular case I placed a "fall through" comment on
its own line, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 net/smc/smc_close.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/smc/smc_close.c b/net/smc/smc_close.c
index f0d16fb..9b16f40 100644
--- a/net/smc/smc_close.c
+++ b/net/smc/smc_close.c
@@ -360,7 +360,8 @@ static void smc_close_passive_work(struct work_struct *work)
 	case SMC_PEERCLOSEWAIT1:
 		if (rxflags->peer_done_writing)
 			sk->sk_state = SMC_PEERCLOSEWAIT2;
-		/* fall through to check for closing */
+		/* to check for closing */
+		/* fall through */
 	case SMC_PEERCLOSEWAIT2:
 	case SMC_PEERFINCLOSEWAIT:
 		if (!smc_cdc_rxed_any_close(&smc->conn))
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-24  9:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-19 22:02 [PATCH] net: smc_close: mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-22  1:08 ` David Miller
2017-10-22  1:21   ` Gustavo A. R. Silva
2017-10-22  1:35     ` [PATCH v2] net: smc_close: mark expected switch fall-through Gustavo A. R. Silva
2017-10-24  9:30       ` David Miller
2017-10-22  2:19     ` [PATCH] net: smc_close: mark expected switch fall-throughs David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).