linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Xichao Zhao <zhao.xichao@vivo.com>, chuck.lever@oracle.com
Cc: neil@brown.name, okorniev@redhat.com, Dai.Ngo@oracle.com,
	tom@talpey.com, 	linux-nfs@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NFSD: Drop redundant conversion to bool
Date: Mon, 18 Aug 2025 07:43:08 -0400	[thread overview]
Message-ID: <c0f4a8ae5fa3d848d7804454df9366c414e9b06c.camel@kernel.org> (raw)
In-Reply-To: <20250818100320.572105-1-zhao.xichao@vivo.com>

On Mon, 2025-08-18 at 18:03 +0800, Xichao Zhao wrote:
> The result of integer comparison already evaluates to bool. No need for
> explicit conversion.
> 
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
> ---
>  fs/nfsd/debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/debugfs.c b/fs/nfsd/debugfs.c
> index 84b0c8b559dc..f07d790d56aa 100644
> --- a/fs/nfsd/debugfs.c
> +++ b/fs/nfsd/debugfs.c
> @@ -26,7 +26,7 @@ static int nfsd_dsr_get(void *data, u64 *val)
>  
>  static int nfsd_dsr_set(void *data, u64 val)
>  {
> -	nfsd_disable_splice_read = (val > 0) ? true : false;
> +	nfsd_disable_splice_read = (val > 0);
>  	return 0;
>  }
>  

Sure...

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2025-08-18 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 10:03 [PATCH] NFSD: Drop redundant conversion to bool Xichao Zhao
2025-08-18 11:43 ` Jeff Layton [this message]
2025-08-18 14:01 ` Chuck Lever

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=c0f4a8ae5fa3d848d7804454df9366c414e9b06c.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    --cc=zhao.xichao@vivo.com \
    /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;
as well as URLs for NNTP newsgroup(s).