linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] mm: vmalloc: Fix a warning in the crash_save_vmcoreinfo_init()
@ 2024-01-11 19:23 Uladzislau Rezki (Sony)
  2024-01-12  5:41 ` Baoquan He
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Uladzislau Rezki (Sony) @ 2024-01-11 19:23 UTC (permalink / raw)
  To: linux-mm, Andrew Morton
  Cc: LKML, Baoquan He, Lorenzo Stoakes, Christoph Hellwig,
	Matthew Wilcox, Liam R . Howlett, Dave Chinner, Uladzislau Rezki,
	Oleksiy Avramchenko, kernel test robot

The vmcoreinfo_append_str() function expects "long unsigned int"
type as a second argument(0x%lx) to print a beginning of vmalloc
start address which is defined as a VMALLOC_START macro.

For some architectures it can be considered as "int" type, for
example m68 generates a compile warning message. To fix it cast
a second argument to "unsigned long".

Fixes: 9bdb180b2d ("mm/vmalloc: remove vmap_area_list")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401120218.y469Puyf-lkp@intel.com/
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
 kernel/crash_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/crash_core.c b/kernel/crash_core.c
index b60de490c1fc..49b31e59d3cc 100644
--- a/kernel/crash_core.c
+++ b/kernel/crash_core.c
@@ -748,7 +748,7 @@ static int __init crash_save_vmcoreinfo_init(void)
 	VMCOREINFO_SYMBOL_ARRAY(swapper_pg_dir);
 #endif
 	VMCOREINFO_SYMBOL(_stext);
-	vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
+	vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", (unsigned long) VMALLOC_START);
 
 #ifndef CONFIG_NUMA
 	VMCOREINFO_SYMBOL(mem_map);
-- 
2.39.2



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-19 19:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-11 19:23 [PATCH 1/1] mm: vmalloc: Fix a warning in the crash_save_vmcoreinfo_init() Uladzislau Rezki (Sony)
2024-01-12  5:41 ` Baoquan He
2024-01-12  5:48 ` Christoph Hellwig
2024-01-12  8:11   ` Uladzislau Rezki
2024-01-19 19:08     ` Geert Uytterhoeven
2024-01-16 22:25 ` Lorenzo Stoakes
2024-01-17  6:27 ` Anshuman Khandual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox