public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Bernard Zhao <bernard@vivo.com>
To: Jesper Dangaard Brouer <hawk@kernel.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Bernard Zhao <bernard@vivo.com>
Subject: [PATCH] net/core: remove useless type conversion to bool
Date: Thu, 18 Nov 2021 17:54:21 -0800	[thread overview]
Message-ID: <20211119015421.108124-1-bernard@vivo.com> (raw)

(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


             reply	other threads:[~2021-11-19  1:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  1:54 Bernard Zhao [this message]
2021-11-19  7:08 ` [PATCH] net/core: remove useless type conversion to bool Ilias Apalodimas
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=20211119015421.108124-1-bernard@vivo.com \
    --to=bernard@vivo.com \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=ilias.apalodimas@linaro.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