mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: "cgel.zte@gmail.com" <cgel.zte@gmail.com>,
	Bruce Fields <bfields@fieldses.org>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Changcheng Deng <deng.changcheng@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] NFSD:fix boolreturn.cocci warning
Date: Tue, 19 Oct 2021 14:33:36 +0000	[thread overview]
Message-ID: <B9D7D22B-EDFA-4144-AFCF-A66E12CB073B@oracle.com> (raw)
In-Reply-To: <20211019041422.975072-1-deng.changcheng@zte.com.cn>



> 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




  reply	other threads:[~2021-10-19 14:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19  4:14 cgel.zte
2021-10-19 14:33 ` Chuck Lever III [this message]
2021-10-19 14:37   ` Bruce Fields

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=B9D7D22B-EDFA-4144-AFCF-A66E12CB073B@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=bfields@fieldses.org \
    --cc=cgel.zte@gmail.com \
    --cc=deng.changcheng@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=zealci@zte.com.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®