Skip to content

Commit 348f9f0

Browse files
rddunlaptorvalds
authored andcommitted
mm/memory_hotplug.c: fix printk format warnings
Fix printk format warnings in mm/memory_hotplug.c by using "%pa": mm/memory_hotplug.c: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'resource_size_t' [-Wformat] mm/memory_hotplug.c: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'resource_size_t' [-Wformat] Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 136e877 commit 348f9f0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎mm/memory_hotplug.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,9 +720,12 @@ int __remove_pages(struct zone *zone, unsigned long phys_start_pfn,
720720
start = phys_start_pfn << PAGE_SHIFT;
721721
size = nr_pages * PAGE_SIZE;
722722
ret = release_mem_region_adjustable(&iomem_resource, start, size);
723-
if (ret)
724-
pr_warn("Unable to release resource <%016llx-%016llx> (%d)\n",
725-
start, start + size - 1, ret);
723+
if (ret) {
724+
resource_size_t endres = start + size - 1;
725+
726+
pr_warn("Unable to release resource <%pa-%pa> (%d)\n",
727+
&start, &endres, ret);
728+
}
726729

727730
sections_to_remove = nr_pages / PAGES_PER_SECTION;
728731
for (i = 0; i < sections_to_remove; i++) {

0 commit comments

Comments
 (0)