mm: cleanups for printing phys_addr_t and dma_addr_t
authorMiles Chen <miles.chen@mediatek.com>
Fri, 24 Feb 2017 22:59:51 +0000 (14:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 25 Feb 2017 01:46:56 +0000 (17:46 -0800)
cleanup rest of dma_addr_t and phys_addr_t type casting in mm
use %pad for dma_addr_t
use %pa for phys_addr_t

Link: http://lkml.kernel.org/r/1486618489-13912-1-git-send-email-miles.chen@mediatek.com
Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/dmapool.c
mm/vmalloc.c

index abcbfe86c25ae12271d96418c5dfb4a592f334d8..cef82b8a9291395e4f9e7ab3262ec97555b222f8 100644 (file)
@@ -434,11 +434,11 @@ void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma)
                spin_unlock_irqrestore(&pool->lock, flags);
                if (pool->dev)
                        dev_err(pool->dev,
-                               "dma_pool_free %s, %p (bad vaddr)/%Lx\n",
-                               pool->name, vaddr, (unsigned long long)dma);
+                               "dma_pool_free %s, %p (bad vaddr)/%pad\n",
+                               pool->name, vaddr, &dma);
                else
-                       pr_err("dma_pool_free %s, %p (bad vaddr)/%Lx\n",
-                              pool->name, vaddr, (unsigned long long)dma);
+                       pr_err("dma_pool_free %s, %p (bad vaddr)/%pad\n",
+                              pool->name, vaddr, &dma);
                return;
        }
        {
@@ -450,11 +450,11 @@ void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma)
                        }
                        spin_unlock_irqrestore(&pool->lock, flags);
                        if (pool->dev)
-                               dev_err(pool->dev, "dma_pool_free %s, dma %Lx already free\n",
-                                       pool->name, (unsigned long long)dma);
+                               dev_err(pool->dev, "dma_pool_free %s, dma %pad already free\n",
+                                       pool->name, &dma);
                        else
-                               pr_err("dma_pool_free %s, dma %Lx already free\n",
-                                      pool->name, (unsigned long long)dma);
+                               pr_err("dma_pool_free %s, dma %pad already free\n",
+                                      pool->name, &dma);
                        return;
                }
        }
index 011b446f87583b94a6353670dc5ce3f94faf7299..be93949b4885991e81a5e0aa0e5ba4d919579f69 100644 (file)
@@ -2659,7 +2659,7 @@ static int s_show(struct seq_file *m, void *p)
                seq_printf(m, " pages=%d", v->nr_pages);
 
        if (v->phys_addr)
-               seq_printf(m, " phys=%llx", (unsigned long long)v->phys_addr);
+               seq_printf(m, " phys=%pa", &v->phys_addr);
 
        if (v->flags & VM_IOREMAP)
                seq_puts(m, " ioremap");