[PATCH] net/core: remove useless type conversion to bool
From: Bernard Zhao
Date: Thu Nov 18 2021 - 20:54:39 EST
(ret == 0) is bool value, the type conversion to true/false value
is not needed.
Signed-off-by: Bernard Zhao <bernard@xxxxxxxx>
---
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