* [merged] mm-dmapoolc-replace-open-coded-list_for_each_entry_safe.patch removed from -mm tree
@ 2020-10-14 21:01 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-10-14 21:01 UTC (permalink / raw)
To: andriy.shevchenko, mm-commits, willy
The patch titled
Subject: mm/dmapool.c: replace open-coded list_for_each_entry_safe()
has been removed from the -mm tree. Its filename was
mm-dmapoolc-replace-open-coded-list_for_each_entry_safe.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: mm/dmapool.c: replace open-coded list_for_each_entry_safe()
There is a place in the code where open-coded version of
list_for_each_entry_safe() is used. Replace that with the standard macro.
Link: http://lkml.kernel.org/r/20200814135055.24898-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/dmapool.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/mm/dmapool.c~mm-dmapoolc-replace-open-coded-list_for_each_entry_safe
+++ a/mm/dmapool.c
@@ -266,6 +266,7 @@ static void pool_free_page(struct dma_po
*/
void dma_pool_destroy(struct dma_pool *pool)
{
+ struct dma_page *page, *tmp;
bool empty = false;
if (unlikely(!pool))
@@ -281,10 +282,7 @@ void dma_pool_destroy(struct dma_pool *p
device_remove_file(pool->dev, &dev_attr_pools);
mutex_unlock(&pools_reg_lock);
- while (!list_empty(&pool->page_list)) {
- struct dma_page *page;
- page = list_entry(pool->page_list.next,
- struct dma_page, page_list);
+ list_for_each_entry_safe(page, tmp, &pool->page_list, page_list) {
if (is_page_busy(page)) {
if (pool->dev)
dev_err(pool->dev,
_
Patches currently in -mm which might be from andriy.shevchenko@linux.intel.com are
kernelh-split-out-min-max-et-al-helpers.patch
list-add-a-macro-to-test-if-entry-is-pointing-to-the-head.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-14 21:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 21:01 [merged] mm-dmapoolc-replace-open-coded-list_for_each_entry_safe.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).