From f226790096d4a032750ddcd17a9feb9e2b983fd0 Mon Sep 17 00:00:00 2001 From: Carlos Llamas Date: Wed, 14 Apr 2021 14:42:13 +0000 Subject: [PATCH] ANDROID: mm/memory_hotplug: fix minor printk format warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the correct printk length specifier [%llx] for u64 variables. This fixes several warnings of the following type: mm/memory_hotplug.c: In function ‘add_memory_subsection’: ./include/linux/kern_levels.h:5:18: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ {aka ‘long long unsigned int’} [-Wformat=] mm/memory_hotplug.c:1144:25: note: format string is defined here pr_err("%s: start 0x%lx size 0x%lx not aligned to subsection size\n", ~~^ %llx Bug: 183339614 Fixes: 417ac617ea5e (ANDROID: mm/memory_hotplug: implement {add/remove}_memory_subsection) Reported-by: kernelci.org bot Signed-off-by: Carlos Llamas Change-Id: Iee89be07cb40513661e336dd0671f65b1161e830 --- mm/memory_hotplug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 080abe95b5c8..9da9da944918 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1141,7 +1141,7 @@ int add_memory_subsection(int nid, u64 start, u64 size) if (!IS_ALIGNED(start, SUBSECTION_SIZE) || !IS_ALIGNED(size, SUBSECTION_SIZE)) { - pr_err("%s: start 0x%lx size 0x%lx not aligned to subsection size\n", + pr_err("%s: start 0x%llx size 0x%llx not aligned to subsection size\n", __func__, start, size); return -EINVAL; } @@ -1161,7 +1161,7 @@ int add_memory_subsection(int nid, u64 start, u64 size) if (ret) { if (IS_ENABLED(CONFIG_ARCH_KEEP_MEMBLOCK)) memblock_remove(start, size); - pr_err("%s failed to add subsection start 0x%lx size 0x%lx\n", + pr_err("%s failed to add subsection start 0x%llx size 0x%llx\n", __func__, start, size); } mem_hotplug_done(); @@ -1851,7 +1851,7 @@ int remove_memory_subsection(int nid, u64 start, u64 size) if (!IS_ALIGNED(start, SUBSECTION_SIZE) || !IS_ALIGNED(size, SUBSECTION_SIZE)) { - pr_err("%s: start 0x%lx size 0x%lx not aligned to subsection size\n", + pr_err("%s: start 0x%llx size 0x%llx not aligned to subsection size\n", __func__, start, size); return -EINVAL; } @@ -1860,7 +1860,7 @@ int remove_memory_subsection(int nid, u64 start, u64 size) /* we cannot remove subsections that are invalid or online */ if(!__check_sections_offline(PHYS_PFN(start), size >> PAGE_SHIFT)) { - pr_err("%s: [%lx, %lx) sections are not offlined\n", + pr_err("%s: [%llx, %llx) sections are not offlined\n", __func__, start, start + size); mem_hotplug_done(); return -EBUSY;