linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfsd: fix fall-through annotations
@ 2018-10-02 10:08 Gustavo A. R. Silva
  2018-10-04  0:46 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-02 10:08 UTC (permalink / raw)
  To: J. Bruce Fields, Jeff Layton; +Cc: linux-nfs, linux-kernel, Gustavo A. R. Silva

Replace "fallthru" with a proper "fall through" annotation.

Also, add an annotation were it is expected to fall through.

These fixes are part of the ongoing efforts to enabling
-Wimplicit-fallthrough

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 fs/nfsd/vfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index d74583f..2751976 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1407,6 +1407,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
 					*created = 1;
 				break;
 			}
+			/* fall through */
 		case NFS4_CREATE_EXCLUSIVE4_1:
 			if (   d_inode(dchild)->i_mtime.tv_sec == v_mtime
 			    && d_inode(dchild)->i_atime.tv_sec == v_atime
@@ -1415,7 +1416,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
 					*created = 1;
 				goto set_attr;
 			}
-			 /* fallthru */
+			/* fall through */
 		case NFS3_CREATE_GUARDED:
 			err = nfserr_exist;
 		}
-- 
2.7.4

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

* Re: [PATCH] nfsd: fix fall-through annotations
  2018-10-02 10:08 [PATCH] nfsd: fix fall-through annotations Gustavo A. R. Silva
@ 2018-10-04  0:46 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2018-10-04  0:46 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Jeff Layton, linux-nfs, linux-kernel

Thanks, applying.--b.

On Tue, Oct 02, 2018 at 12:08:48PM +0200, Gustavo A. R. Silva wrote:
> Replace "fallthru" with a proper "fall through" annotation.
> 
> Also, add an annotation were it is expected to fall through.
> 
> These fixes are part of the ongoing efforts to enabling
> -Wimplicit-fallthrough
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  fs/nfsd/vfs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index d74583f..2751976 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -1407,6 +1407,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
>  					*created = 1;
>  				break;
>  			}
> +			/* fall through */
>  		case NFS4_CREATE_EXCLUSIVE4_1:
>  			if (   d_inode(dchild)->i_mtime.tv_sec == v_mtime
>  			    && d_inode(dchild)->i_atime.tv_sec == v_atime
> @@ -1415,7 +1416,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
>  					*created = 1;
>  				goto set_attr;
>  			}
> -			 /* fallthru */
> +			/* fall through */
>  		case NFS3_CREATE_GUARDED:
>  			err = nfserr_exist;
>  		}
> -- 
> 2.7.4

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

end of thread, other threads:[~2018-10-04  7:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02 10:08 [PATCH] nfsd: fix fall-through annotations Gustavo A. R. Silva
2018-10-04  0:46 ` J. Bruce Fields

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).