* [PATCH] NFSD:fix boolreturn.cocci warning
@ 2021-10-19 4:14 cgel.zte
2021-10-19 14:33 ` Chuck Lever III
0 siblings, 1 reply; 3+ messages in thread
From: cgel.zte @ 2021-10-19 4:14 UTC (permalink / raw)
To: bfields; +Cc: chuck.lever, linux-nfs, linux-kernel, Changcheng Deng, Zeal Robot
From: Changcheng Deng <deng.changcheng@zte.com.cn>
./fs/nfsd/nfssvc.c: 1072: 8-9: :WARNING return of 0/1 in function
'nfssvc_decode_voidarg' with return type bool
Return statements in functions returning bool should use true/false
instead of 1/0.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
fs/nfsd/nfssvc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 362e819ff06a..80431921e5d7 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -1069,7 +1069,7 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
*/
bool nfssvc_decode_voidarg(struct svc_rqst *rqstp, struct xdr_stream *xdr)
{
- return 1;
+ return true;
}
/**
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] NFSD:fix boolreturn.cocci warning
2021-10-19 4:14 [PATCH] NFSD:fix boolreturn.cocci warning cgel.zte
@ 2021-10-19 14:33 ` Chuck Lever III
2021-10-19 14:37 ` Bruce Fields
0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever III @ 2021-10-19 14:33 UTC (permalink / raw)
To: cgel.zte, Bruce Fields
Cc: Linux NFS Mailing List, Linux Kernel Mailing List,
Changcheng Deng, Zeal Robot
> On Oct 19, 2021, at 12:14 AM, cgel.zte@gmail.com wrote:
>
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> ./fs/nfsd/nfssvc.c: 1072: 8-9: :WARNING return of 0/1 in function
> 'nfssvc_decode_voidarg' with return type bool
>
> Return statements in functions returning bool should use true/false
> instead of 1/0.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
LGTM.
> ---
> fs/nfsd/nfssvc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> index 362e819ff06a..80431921e5d7 100644
> --- a/fs/nfsd/nfssvc.c
> +++ b/fs/nfsd/nfssvc.c
> @@ -1069,7 +1069,7 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
> */
> bool nfssvc_decode_voidarg(struct svc_rqst *rqstp, struct xdr_stream *xdr)
> {
> - return 1;
> + return true;
> }
>
> /**
> --
> 2.25.1
>
--
Chuck Lever
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] NFSD:fix boolreturn.cocci warning
2021-10-19 14:33 ` Chuck Lever III
@ 2021-10-19 14:37 ` Bruce Fields
0 siblings, 0 replies; 3+ messages in thread
From: Bruce Fields @ 2021-10-19 14:37 UTC (permalink / raw)
To: Chuck Lever III
Cc: cgel.zte, Linux NFS Mailing List, Linux Kernel Mailing List,
Changcheng Deng, Zeal Robot
On Tue, Oct 19, 2021 at 02:33:36PM +0000, Chuck Lever III wrote:
>
>
> > On Oct 19, 2021, at 12:14 AM, cgel.zte@gmail.com wrote:
> >
> > From: Changcheng Deng <deng.changcheng@zte.com.cn>
> >
> > ./fs/nfsd/nfssvc.c: 1072: 8-9: :WARNING return of 0/1 in function
> > 'nfssvc_decode_voidarg' with return type bool
> >
> > Return statements in functions returning bool should use true/false
> > instead of 1/0.
> >
> > Reported-by: Zeal Robot <zealci@zte.com.cn>
> > Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> LGTM.
OK, applying for 5.16.--b.
>
>
> > ---
> > fs/nfsd/nfssvc.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> > index 362e819ff06a..80431921e5d7 100644
> > --- a/fs/nfsd/nfssvc.c
> > +++ b/fs/nfsd/nfssvc.c
> > @@ -1069,7 +1069,7 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
> > */
> > bool nfssvc_decode_voidarg(struct svc_rqst *rqstp, struct xdr_stream *xdr)
> > {
> > - return 1;
> > + return true;
> > }
> >
> > /**
> > --
> > 2.25.1
> >
>
> --
> Chuck Lever
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-19 14:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 4:14 [PATCH] NFSD:fix boolreturn.cocci warning cgel.zte
2021-10-19 14:33 ` Chuck Lever III
2021-10-19 14:37 ` 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).