From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: Ursula Braun <ubraun@linux.vnet.ibm.com>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH] net: smc_close: mark expected switch fall-throughs
Date: Thu, 19 Oct 2017 17:02:44 -0500 [thread overview]
Message-ID: <20171019220244.GA22041@embeddedor.com> (raw)
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
next reply other threads:[~2017-10-19 22:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 22:02 Gustavo A. R. Silva [this message]
2017-10-22 1:08 ` [PATCH] net: smc_close: mark expected switch fall-throughs David Miller
2017-10-22 1:21 ` Gustavo A. R. Silva
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171019220244.GA22041@embeddedor.com \
--to=garsilva@embeddedor.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ubraun@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.