All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/core: remove useless type conversion to bool
@ 2021-11-19  1:54 Bernard Zhao
  2021-11-19  7:08 ` Ilias Apalodimas
  2021-11-19  9:59 ` Joe Perches
  0 siblings, 2 replies; 3+ messages in thread
From: Bernard Zhao @ 2021-11-19  1:54 UTC (permalink / raw)
  To: Jesper Dangaard Brouer, Ilias Apalodimas, David S. Miller,
	Jakub Kicinski, netdev, linux-kernel
  Cc: Bernard Zhao

(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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-19  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19  1:54 [PATCH] net/core: remove useless type conversion to bool Bernard Zhao
2021-11-19  7:08 ` Ilias Apalodimas
2021-11-19  9:59 ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.