From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Devesh Sharma
<Devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH rdma-core] bnxt_re: Fix -Wimplicit-fallthrough warnings in GCC 7.1
Date: Thu, 13 Jul 2017 11:51:22 -0600 [thread overview]
Message-ID: <20170713175122.GD11069@obsidianresearch.com> (raw)
In-Reply-To: <20170713133935.1206-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
On Thu, Jul 13, 2017 at 04:39:35PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> [59/189] Building C object providers/bnxt_re/CMakeFiles/bnxt_re-rdmav2.dir/verbs.c.o
> ../providers/bnxt_re/verbs.c: In function ‘bnxt_re_post_send’:
> ../providers/bnxt_re/verbs.c:1222:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
> hdr->key_immd = htole32(be32toh(wr->imm_data));
> ^
> ../providers/bnxt_re/verbs.c:1223:3: note: here
> case IBV_WR_SEND:
> ^~~~
> ../providers/bnxt_re/verbs.c:1232:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
> hdr->key_immd = htole32(be32toh(wr->imm_data));
> ^
> ../providers/bnxt_re/verbs.c:1233:3: note: here
> case IBV_WR_RDMA_WRITE:
Can you follow the same approach as I used in
commit 47cd2efcd4cd416ead0a1a48153aa27a2e178ce5
Author: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Date: Tue Jan 31 14:55:50 2017 -0700
Annotate correct switch fall throughs with SWITCH_FALLTHROUGH
Or convert those cases to this approach?
> * LE platform be32toh will do the job.
> */
> hdr->key_immd = htole32(be32toh(wr->imm_data));
> + /* FALLTHROUGH */
Use the SWITCH_FALLTHROUGH; macro
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-07-13 17:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 13:39 [PATCH rdma-core] bnxt_re: Fix -Wimplicit-fallthrough warnings in GCC 7.1 Leon Romanovsky
[not found] ` <20170713133935.1206-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-07-13 15:06 ` Bart Van Assche
[not found] ` <1499958370.2740.4.camel-Sjgp3cTcYWE@public.gmane.org>
2017-07-13 15:34 ` Leon Romanovsky
2017-07-13 17:51 ` Jason Gunthorpe [this message]
[not found] ` <20170713175122.GD11069-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-07-13 17:54 ` Bart Van Assche
[not found] ` <1499968451.2740.14.camel-Sjgp3cTcYWE@public.gmane.org>
2017-07-13 18:15 ` Jason Gunthorpe
[not found] ` <20170713181536.GA4771-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-07-13 19:08 ` Leon Romanovsky
[not found] ` <20170713190829.GQ1528-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-07-13 19:24 ` Jason Gunthorpe
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=20170713175122.GD11069@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=Devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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.