]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/early_ioremap.c: use %pa to print resource_size_t variables
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 31 Jan 2020 06:13:54 +0000 (22:13 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 31 Jan 2020 18:30:38 +0000 (10:30 -0800)
%pa takes into consideration the special types such as resource_size_t.
Use this specifier %instead of explicit casting.

Link: http://lkml.kernel.org/r/20191209165413.56263-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/early_ioremap.c

index 1826f191e72c836c59970006528e39bd791209bc..a0018ad1a1f6af0499cc2148ceca1dbb9c19629a 100644 (file)
@@ -121,8 +121,8 @@ __early_ioremap(resource_size_t phys_addr, unsigned long size, pgprot_t prot)
                }
        }
 
-       if (WARN(slot < 0, "%s(%08llx, %08lx) not found slot\n",
-                __func__, (u64)phys_addr, size))
+       if (WARN(slot < 0, "%s(%pa, %08lx) not found slot\n",
+                __func__, &phys_addr, size))
                return NULL;
 
        /* Don't allow wraparound or zero size */
@@ -158,8 +158,8 @@ __early_ioremap(resource_size_t phys_addr, unsigned long size, pgprot_t prot)
                --idx;
                --nrpages;
        }
-       WARN(early_ioremap_debug, "%s(%08llx, %08lx) [%d] => %08lx + %08lx\n",
-            __func__, (u64)phys_addr, size, slot, offset, slot_virt[slot]);
+       WARN(early_ioremap_debug, "%s(%pa, %08lx) [%d] => %08lx + %08lx\n",
+            __func__, &phys_addr, size, slot, offset, slot_virt[slot]);
 
        prev_map[slot] = (void __iomem *)(offset + slot_virt[slot]);
        return prev_map[slot];