Commit 41a04814 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Torvalds

mm/dmapool.c: replace hard coded function name with __func__

No need to hard code function name when __func__ can be used.

While here, replace specifiers for special types like dma_addr_t.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Link: http://lkml.kernel.org/r/20200814135055.24898-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 42286f83
...@@ -285,11 +285,10 @@ void dma_pool_destroy(struct dma_pool *pool) ...@@ -285,11 +285,10 @@ void dma_pool_destroy(struct dma_pool *pool)
list_for_each_entry_safe(page, tmp, &pool->page_list, page_list) { list_for_each_entry_safe(page, tmp, &pool->page_list, page_list) {
if (is_page_busy(page)) { if (is_page_busy(page)) {
if (pool->dev) if (pool->dev)
dev_err(pool->dev, dev_err(pool->dev, "%s %s, %p busy\n", __func__,
"dma_pool_destroy %s, %p busy\n",
pool->name, page->vaddr); pool->name, page->vaddr);
else else
pr_err("dma_pool_destroy %s, %p busy\n", pr_err("%s %s, %p busy\n", __func__,
pool->name, page->vaddr); pool->name, page->vaddr);
/* leak the still-in-use consistent memory */ /* leak the still-in-use consistent memory */
list_del(&page->page_list); list_del(&page->page_list);
...@@ -353,12 +352,11 @@ void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, ...@@ -353,12 +352,11 @@ void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
if (data[i] == POOL_POISON_FREED) if (data[i] == POOL_POISON_FREED)
continue; continue;
if (pool->dev) if (pool->dev)
dev_err(pool->dev, dev_err(pool->dev, "%s %s, %p (corrupted)\n",
"dma_pool_alloc %s, %p (corrupted)\n", __func__, pool->name, retval);
pool->name, retval);
else else
pr_err("dma_pool_alloc %s, %p (corrupted)\n", pr_err("%s %s, %p (corrupted)\n",
pool->name, retval); __func__, pool->name, retval);
/* /*
* Dump the first 4 bytes even if they are not * Dump the first 4 bytes even if they are not
...@@ -414,12 +412,11 @@ void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma) ...@@ -414,12 +412,11 @@ void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma)
if (!page) { if (!page) {
spin_unlock_irqrestore(&pool->lock, flags); spin_unlock_irqrestore(&pool->lock, flags);
if (pool->dev) if (pool->dev)
dev_err(pool->dev, dev_err(pool->dev, "%s %s, %p/%pad (bad dma)\n",
"dma_pool_free %s, %p/%lx (bad dma)\n", __func__, pool->name, vaddr, &dma);
pool->name, vaddr, (unsigned long)dma);
else else
pr_err("dma_pool_free %s, %p/%lx (bad dma)\n", pr_err("%s %s, %p/%pad (bad dma)\n",
pool->name, vaddr, (unsigned long)dma); __func__, pool->name, vaddr, &dma);
return; return;
} }
...@@ -430,12 +427,11 @@ void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma) ...@@ -430,12 +427,11 @@ void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma)
if ((dma - page->dma) != offset) { if ((dma - page->dma) != offset) {
spin_unlock_irqrestore(&pool->lock, flags); spin_unlock_irqrestore(&pool->lock, flags);
if (pool->dev) if (pool->dev)
dev_err(pool->dev, dev_err(pool->dev, "%s %s, %p (bad vaddr)/%pad\n",
"dma_pool_free %s, %p (bad vaddr)/%pad\n", __func__, pool->name, vaddr, &dma);
pool->name, vaddr, &dma);
else else
pr_err("dma_pool_free %s, %p (bad vaddr)/%pad\n", pr_err("%s %s, %p (bad vaddr)/%pad\n",
pool->name, vaddr, &dma); __func__, pool->name, vaddr, &dma);
return; return;
} }
{ {
...@@ -447,11 +443,11 @@ void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma) ...@@ -447,11 +443,11 @@ void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma)
} }
spin_unlock_irqrestore(&pool->lock, flags); spin_unlock_irqrestore(&pool->lock, flags);
if (pool->dev) if (pool->dev)
dev_err(pool->dev, "dma_pool_free %s, dma %pad already free\n", dev_err(pool->dev, "%s %s, dma %pad already free\n",
pool->name, &dma); __func__, pool->name, &dma);
else else
pr_err("dma_pool_free %s, dma %pad already free\n", pr_err("%s %s, dma %pad already free\n",
pool->name, &dma); __func__, pool->name, &dma);
return; return;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment