On Wed, Aug 12, 2020 at 06:30:59PM +0300, Andy Shevchenko wrote: > 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); Eh, I'd rather see this as: struct dma_page *page = list_first_entry(&pool->page_list, struct dma_page, page_list);