public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Bernard Zhao <bernard@vivo.com>
Cc: Jesper Dangaard Brouer <hawk@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/core: remove useless type conversion to bool
Date: Fri, 19 Nov 2021 09:08:17 +0200	[thread overview]
Message-ID: <YZdNYWfr89/9NcD0@apalos.home> (raw)
In-Reply-To: <20211119015421.108124-1-bernard@vivo.com>

On Thu, Nov 18, 2021 at 05:54:21PM -0800, Bernard Zhao wrote:
> (ret == 0) is bool value, the type conversion to true/false value
> is not needed.
> 
> Signed-off-by: Bernard Zhao <bernard@vivo.com>
> ---
>  net/core/page_pool.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
> index 9b60e4301a44..d660d46f6ad6 100644
> --- a/net/core/page_pool.c
> +++ b/net/core/page_pool.c
> @@ -398,7 +398,7 @@ static bool page_pool_recycle_in_ring(struct page_pool *pool, struct page *page)
>  	else
>  		ret = ptr_ring_produce_bh(&pool->ring, page);
>  
> -	return (ret == 0) ? true : false;
> +	return (ret == 0);
>  }
>  
>  /* Only allow direct recycling in special circumstances, into the
> -- 
> 2.33.1
> 
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

  reply	other threads:[~2021-11-19  7:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  1:54 [PATCH] net/core: remove useless type conversion to bool Bernard Zhao
2021-11-19  7:08 ` Ilias Apalodimas [this message]
2021-11-19  9:59 ` Joe Perches

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=YZdNYWfr89/9NcD0@apalos.home \
    --to=ilias.apalodimas@linaro.org \
    --cc=bernard@vivo.com \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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