From: "Dilger, Andreas" <andreas.dilger@intel.com>
To: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Cc: "Drokin, Oleg" <oleg.drokin@intel.com>,
James Simmons <jsimmons@infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"lustre-devel@lists.lustre.org" <lustre-devel@lists.lustre.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 20/20] staging: lustre: rpc: mark expected switch fall-throughs
Date: Tue, 17 Oct 2017 23:05:05 +0000 [thread overview]
Message-ID: <6EFF7C2E-4962-49DE-A71A-072C9E9FCBC1@intel.com> (raw)
In-Reply-To: <93be012259825eb72c235b293f44e729797b38c9.1507781178.git.garsilva@embeddedor.com>
On Oct 12, 2017, at 10:17, Gustavo A. R. Silva <garsilva@embeddedor.com> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 1077604
> Addresses-Coverity-ID: 1077605
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
> ---
> drivers/staging/lustre/lnet/selftest/rpc.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c
> index 77c222c..74ef3c3 100644
> --- a/drivers/staging/lustre/lnet/selftest/rpc.c
> +++ b/drivers/staging/lustre/lnet/selftest/rpc.c
> @@ -1037,6 +1037,7 @@ srpc_handle_rpc(struct swi_workitem *wi)
> ev->ev_status = rc;
> }
> }
> + /* fall through */
> case SWI_STATE_BULK_STARTED:
> LASSERT(!rpc->srpc_bulk || ev->ev_fired);
>
> @@ -1237,7 +1238,8 @@ srpc_send_rpc(struct swi_workitem *wi)
> break;
>
> wi->swi_state = SWI_STATE_REQUEST_SENT;
> - /* perhaps more events, fall thru */
> + /* perhaps more events */
> + /* fall through */
> case SWI_STATE_REQUEST_SENT: {
> enum srpc_msg_type type = srpc_service2reply(rpc->crpc_service);
>
> @@ -1269,6 +1271,7 @@ srpc_send_rpc(struct swi_workitem *wi)
>
> wi->swi_state = SWI_STATE_REPLY_RECEIVED;
> }
> + /* fall through */
> case SWI_STATE_REPLY_RECEIVED:
> if (do_bulk && !rpc->crpc_bulkev.ev_fired)
> break;
> @@ -1448,6 +1451,7 @@ srpc_lnet_ev_handler(struct lnet_event *ev)
> srpc_data.rpc_counters.rpcs_sent++;
> spin_unlock(&srpc_data.rpc_glock);
> }
> + /* fall through */
> case SRPC_REPLY_RCVD:
> case SRPC_BULK_REQ_RCVD:
> crpc = rpcev->ev_data;
> @@ -1570,7 +1574,7 @@ srpc_lnet_ev_handler(struct lnet_event *ev)
>
> if (!ev->unlinked)
> break; /* wait for final event */
> -
> + /* fall through */
> case SRPC_BULK_PUT_SENT:
> if (!ev->status && ev->type != LNET_EVENT_UNLINK) {
> spin_lock(&srpc_data.rpc_glock);
> @@ -1582,6 +1586,7 @@ srpc_lnet_ev_handler(struct lnet_event *ev)
>
> spin_unlock(&srpc_data.rpc_glock);
> }
> + /* fall through */
> case SRPC_REPLY_SENT:
> srpc = rpcev->ev_data;
> scd = srpc->srpc_scd;
> @@ -1674,14 +1679,14 @@ srpc_shutdown(void)
> spin_unlock(&srpc_data.rpc_glock);
>
> stt_shutdown();
> -
> + /* fall through */
> case SRPC_STATE_EQ_INIT:
> rc = LNetClearLazyPortal(SRPC_FRAMEWORK_REQUEST_PORTAL);
> rc = LNetClearLazyPortal(SRPC_REQUEST_PORTAL);
> LASSERT(!rc);
> rc = LNetEQFree(srpc_data.rpc_lnet_eq);
> LASSERT(!rc); /* the EQ should have no user by now */
> -
> + /* fall through */
> case SRPC_STATE_NI_INIT:
> LNetNIFini();
> }
> --
> 2.7.4
>
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
next prev parent reply other threads:[~2017-10-17 23:05 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 16:15 [PATCH 00/20] mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-12 16:15 ` [PATCH 01/20] staging: ks7010: ks_wlan_net: " Gustavo A. R. Silva
2017-10-12 16:16 ` [PATCH 02/20] staging: lustre: lnet: socklnd: mark expected switch fall-through Gustavo A. R. Silva
2017-10-17 22:56 ` Dilger, Andreas
2017-10-12 16:16 ` [PATCH 03/20] staging: rtl8192e: " Gustavo A. R. Silva
2017-10-12 16:16 ` [PATCH 04/20] staging: rtl8723bs: rtw_mlme_ext: " Gustavo A. R. Silva
2017-10-12 16:16 ` [PATCH 05/20] staging: lustre: lnet: net_fault: " Gustavo A. R. Silva
2017-10-17 22:57 ` Dilger, Andreas
2017-10-12 16:16 ` [PATCH 06/20] staging: comedi: s526: " Gustavo A. R. Silva
2017-10-12 16:16 ` [PATCH 07/20] staging: rtl8188eu: usb_halinit: " Gustavo A. R. Silva
2017-10-12 16:16 ` [PATCH 08/20] staging: vc04_services: vchiq_core: " Gustavo A. R. Silva
2017-10-12 17:29 ` Stefan Wahren
2017-10-12 16:16 ` [PATCH 09/20] staging: vt6656: card: mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-12 16:16 ` [PATCH 10/20] staging: rtl8188eu: usb_ops_linux: mark expected switch fall-through Gustavo A. R. Silva
2017-10-12 16:17 ` [PATCH 11/20] staging: r8822be: mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-12 16:17 ` [PATCH 12/20] staging: lustre: lnet: selftest: mark expected switch fall-through Gustavo A. R. Silva
2017-10-17 23:05 ` Dilger, Andreas
2017-10-12 16:17 ` [PATCH 13/20] staging: rtlwifi: halmac: " Gustavo A. R. Silva
2017-10-12 16:17 ` [PATCH 14/20] staging: lustre: lnet: selftest: mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-17 22:58 ` Dilger, Andreas
2017-10-12 16:17 ` [PATCH 15/20] staging: lustre: llite: mark expected switch fall-through Gustavo A. R. Silva
2017-10-17 23:00 ` Dilger, Andreas
2017-10-12 16:17 ` [PATCH 16/20] staging: lustre: lprocfs: mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-17 23:00 ` Dilger, Andreas
2017-10-12 16:17 ` [PATCH 17/20] staging: lustre: ldlm: mark expected switch fall-through Gustavo A. R. Silva
2017-10-17 23:01 ` Dilger, Andreas
2017-10-12 16:17 ` [PATCH 18/20] staging: lustre: osc: " Gustavo A. R. Silva
2017-10-17 23:03 ` Dilger, Andreas
2017-10-12 16:17 ` [PATCH 19/20] staging: lustre: ptlrpc: mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-17 23:04 ` Dilger, Andreas
2017-10-12 16:17 ` [PATCH 20/20] staging: lustre: rpc: " Gustavo A. R. Silva
2017-10-17 23:05 ` Dilger, Andreas [this message]
2017-10-23 19:33 ` [PATCH 00/20] " Gustavo A. R. Silva
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=6EFF7C2E-4962-49DE-A71A-072C9E9FCBC1@intel.com \
--to=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=garsilva@embeddedor.com \
--cc=gregkh@linuxfoundation.org \
--cc=jsimmons@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.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 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).