[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211119015421.108124-1-bernard@vivo.com>
Date: Thu, 18 Nov 2021 17:54:21 -0800
From: Bernard Zhao <bernard@...o.com>
To: Jesper Dangaard Brouer <hawk@...nel.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Bernard Zhao <bernard@...o.com>
Subject: [PATCH] net/core: remove useless type conversion to bool
(ret == 0) is bool value, the type conversion to true/false value
is not needed.
Signed-off-by: Bernard Zhao <bernard@...o.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
Powered by blists - more mailing lists