lkml.org 
[lkml]   [2018]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] rds: send: mark expected switch fall-through in rds_rm_size
From
Date
Hi,

2/19/2018 10:10 AM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 1465362 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> net/rds/send.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/rds/send.c b/net/rds/send.c
> index 028ab59..79d158b 100644
> --- a/net/rds/send.c
> +++ b/net/rds/send.c
> @@ -902,6 +902,8 @@ static int rds_rm_size(struct msghdr *msg, int num_sgs)
>
> case RDS_CMSG_ZCOPY_COOKIE:
> zcopy_cookie = true;
> + /* fall through */
> +
> case RDS_CMSG_RDMA_DEST:
> case RDS_CMSG_RDMA_MAP:
> cmsg_groups |= 2;
>
So coverity greps for commet as "fall through" for
-Wimplicit-fallthrough build ?

Adding that comments itself if fine but was curious
about it if some one makes a spell error in this
comment what happens ;-)

For patch itself,
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

\
 
 \ /
  Last update: 2018-02-20 18:56    [W:0.059 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site