Message ID | 0669408377bdc6ee87b214b2756465a6edc354fc.1605896059.git.gustavoars@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix fall-through warnings for Clang | expand |
> On Nov 20, 2020, at 1:26 PM, Gustavo A. R. Silva <gustavoars@kernel.org> wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding a couple of break statements instead of > just letting the code fall through to the next case. > > Link: https://github.com/KSPP/linux/issues/115 > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> > --- > fs/nfsd/nfs4state.c | 1 + > fs/nfsd/nfsctl.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c > index d7f27ed6b794..cdab0d5be186 100644 > --- a/fs/nfsd/nfs4state.c > +++ b/fs/nfsd/nfs4state.c > @@ -3113,6 +3113,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, > goto out_nolock; > } > new->cl_mach_cred = true; > + break; > case SP4_NONE: > break; > default: /* checked by xdr code */ > diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c > index f6d5d783f4a4..9a3bb1e217f9 100644 > --- a/fs/nfsd/nfsctl.c > +++ b/fs/nfsd/nfsctl.c > @@ -1165,6 +1165,7 @@ static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode) > inode->i_fop = &simple_dir_operations; > inode->i_op = &simple_dir_inode_operations; > inc_nlink(inode); > + break; > default: > break; > } > -- > 2.27.0 > Acked-by: Chuck Lever <chuck.lever@oracle.com> -- Chuck Lever
On Fri, Nov 20, 2020 at 01:27:51PM -0500, Chuck Lever wrote: > > > > On Nov 20, 2020, at 1:26 PM, Gustavo A. R. Silva <gustavoars@kernel.org> wrote: > > > > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > > warnings by explicitly adding a couple of break statements instead of > > just letting the code fall through to the next case. > > > > Link: https://github.com/KSPP/linux/issues/115 > > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> > > --- > > fs/nfsd/nfs4state.c | 1 + > > fs/nfsd/nfsctl.c | 1 + > > 2 files changed, 2 insertions(+) > > > > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c > > index d7f27ed6b794..cdab0d5be186 100644 > > --- a/fs/nfsd/nfs4state.c > > +++ b/fs/nfsd/nfs4state.c > > @@ -3113,6 +3113,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, > > goto out_nolock; > > } > > new->cl_mach_cred = true; > > + break; > > case SP4_NONE: > > break; > > default: /* checked by xdr code */ > > diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c > > index f6d5d783f4a4..9a3bb1e217f9 100644 > > --- a/fs/nfsd/nfsctl.c > > +++ b/fs/nfsd/nfsctl.c > > @@ -1165,6 +1165,7 @@ static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode) > > inode->i_fop = &simple_dir_operations; > > inode->i_op = &simple_dir_inode_operations; > > inc_nlink(inode); > > + break; > > default: > > break; > > } > > -- > > 2.27.0 > > > > Acked-by: Chuck Lever <chuck.lever@oracle.com> Thanks, Chuck. -- Gustavo
Hi all, Friendly ping: who can take this, please? Thanks -- Gustavo On 11/23/20 16:46, Gustavo A. R. Silva wrote: > On Fri, Nov 20, 2020 at 01:27:51PM -0500, Chuck Lever wrote: >> >> >>> On Nov 20, 2020, at 1:26 PM, Gustavo A. R. Silva <gustavoars@kernel.org> wrote: >>> >>> In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple >>> warnings by explicitly adding a couple of break statements instead of >>> just letting the code fall through to the next case. >>> >>> Link: https://github.com/KSPP/linux/issues/115 >>> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> >>> --- >>> fs/nfsd/nfs4state.c | 1 + >>> fs/nfsd/nfsctl.c | 1 + >>> 2 files changed, 2 insertions(+) >>> >>> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c >>> index d7f27ed6b794..cdab0d5be186 100644 >>> --- a/fs/nfsd/nfs4state.c >>> +++ b/fs/nfsd/nfs4state.c >>> @@ -3113,6 +3113,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, >>> goto out_nolock; >>> } >>> new->cl_mach_cred = true; >>> + break; >>> case SP4_NONE: >>> break; >>> default: /* checked by xdr code */ >>> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c >>> index f6d5d783f4a4..9a3bb1e217f9 100644 >>> --- a/fs/nfsd/nfsctl.c >>> +++ b/fs/nfsd/nfsctl.c >>> @@ -1165,6 +1165,7 @@ static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode) >>> inode->i_fop = &simple_dir_operations; >>> inode->i_op = &simple_dir_inode_operations; >>> inc_nlink(inode); >>> + break; >>> default: >>> break; >>> } >>> -- >>> 2.27.0 >>> >> >> Acked-by: Chuck Lever <chuck.lever@oracle.com> > > Thanks, Chuck. > -- > Gustavo >
> On Apr 20, 2021, at 4:28 PM, Gustavo A. R. Silva <gustavo@embeddedor.com> wrote: > > Hi all, > > Friendly ping: who can take this, please? Hum. I thought this was going through another tree. I can take it for the second v5.13 NFSD PR. > Thanks > -- > Gustavo > > On 11/23/20 16:46, Gustavo A. R. Silva wrote: >> On Fri, Nov 20, 2020 at 01:27:51PM -0500, Chuck Lever wrote: >>> >>> >>>> On Nov 20, 2020, at 1:26 PM, Gustavo A. R. Silva <gustavoars@kernel.org> wrote: >>>> >>>> In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple >>>> warnings by explicitly adding a couple of break statements instead of >>>> just letting the code fall through to the next case. >>>> >>>> Link: https://github.com/KSPP/linux/issues/115 >>>> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> >>>> --- >>>> fs/nfsd/nfs4state.c | 1 + >>>> fs/nfsd/nfsctl.c | 1 + >>>> 2 files changed, 2 insertions(+) >>>> >>>> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c >>>> index d7f27ed6b794..cdab0d5be186 100644 >>>> --- a/fs/nfsd/nfs4state.c >>>> +++ b/fs/nfsd/nfs4state.c >>>> @@ -3113,6 +3113,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, >>>> goto out_nolock; >>>> } >>>> new->cl_mach_cred = true; >>>> + break; >>>> case SP4_NONE: >>>> break; >>>> default: /* checked by xdr code */ >>>> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c >>>> index f6d5d783f4a4..9a3bb1e217f9 100644 >>>> --- a/fs/nfsd/nfsctl.c >>>> +++ b/fs/nfsd/nfsctl.c >>>> @@ -1165,6 +1165,7 @@ static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode) >>>> inode->i_fop = &simple_dir_operations; >>>> inode->i_op = &simple_dir_inode_operations; >>>> inc_nlink(inode); >>>> + break; >>>> default: >>>> break; >>>> } >>>> -- >>>> 2.27.0 >>>> >>> >>> Acked-by: Chuck Lever <chuck.lever@oracle.com> >> >> Thanks, Chuck. >> -- >> Gustavo -- Chuck Lever
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index d7f27ed6b794..cdab0d5be186 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -3113,6 +3113,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, goto out_nolock; } new->cl_mach_cred = true; + break; case SP4_NONE: break; default: /* checked by xdr code */ diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index f6d5d783f4a4..9a3bb1e217f9 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -1165,6 +1165,7 @@ static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode) inode->i_fop = &simple_dir_operations; inode->i_op = &simple_dir_inode_operations; inc_nlink(inode); + break; default: break; }
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple of break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> --- fs/nfsd/nfs4state.c | 1 + fs/nfsd/nfsctl.c | 1 + 2 files changed, 2 insertions(+)