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