[PATCH v1] mm/dmapool.c: Replace open-coded list_first_entry()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is a place in the code where open-coded version of list_first_entry()
is used. Replace that with the standard macro.

While here, separate definitions from the code to avoid a churn by janitors.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
 mm/dmapool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/dmapool.c b/mm/dmapool.c
index f9fb9bbd733e..049ac1459714 100644
--- a/mm/dmapool.c
+++ b/mm/dmapool.c
@@ -283,8 +283,8 @@ void dma_pool_destroy(struct dma_pool *pool)
 
 	while (!list_empty(&pool->page_list)) {
 		struct dma_page *page;
-		page = list_entry(pool->page_list.next,
-				  struct dma_page, page_list);
+
+		page = list_first_entry(&pool->page_list, struct dma_page, page_list);
 		if (is_page_busy(page)) {
 			if (pool->dev)
 				dev_err(pool->dev,
-- 
2.28.0





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux