Re: [linux-next:master 12997/13245] kernel/crash_core.c:751:58: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'int'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 12, 2024 at 02:22:16AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   9e21984d62c56a0f6d1fc6f76b646212cfd7fe88
> commit: 9bdb180b2db685e42841d138600491fbea20ae0f [12997/13245] mm/vmalloc: remove vmap_area_list
> config: m68k-sun3_defconfig (https://download.01.org/0day-ci/archive/20240112/202401120218.y469Puyf-lkp@xxxxxxxxx/config)
> compiler: m68k-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240112/202401120218.y469Puyf-lkp@xxxxxxxxx/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202401120218.y469Puyf-lkp@xxxxxxxxx/
> 
> All warnings (new ones prefixed by >>):
> 
>    kernel/crash_core.c: In function 'crash_save_vmcoreinfo_init':
> >> kernel/crash_core.c:751:58: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=]
>      751 |         vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
>          |                                                        ~~^
>          |                                                          |
>          |                                                          long unsigned int
>          |                                                        %x
> 
> 
> vim +751 kernel/crash_core.c
> 
>    722	
>    723	static int __init crash_save_vmcoreinfo_init(void)
>    724	{
>    725		vmcoreinfo_data = (unsigned char *)get_zeroed_page(GFP_KERNEL);
>    726		if (!vmcoreinfo_data) {
>    727			pr_warn("Memory allocation for vmcoreinfo_data failed\n");
>    728			return -ENOMEM;
>    729		}
>    730	
>    731		vmcoreinfo_note = alloc_pages_exact(VMCOREINFO_NOTE_SIZE,
>    732							GFP_KERNEL | __GFP_ZERO);
>    733		if (!vmcoreinfo_note) {
>    734			free_page((unsigned long)vmcoreinfo_data);
>    735			vmcoreinfo_data = NULL;
>    736			pr_warn("Memory allocation for vmcoreinfo_note failed\n");
>    737			return -ENOMEM;
>    738		}
>    739	
>    740		VMCOREINFO_OSRELEASE(init_uts_ns.name.release);
>    741		VMCOREINFO_BUILD_ID();
>    742		VMCOREINFO_PAGESIZE(PAGE_SIZE);
>    743	
>    744		VMCOREINFO_SYMBOL(init_uts_ns);
>    745		VMCOREINFO_OFFSET(uts_namespace, name);
>    746		VMCOREINFO_SYMBOL(node_online_map);
>    747	#ifdef CONFIG_MMU
>    748		VMCOREINFO_SYMBOL_ARRAY(swapper_pg_dir);
>    749	#endif
>    750		VMCOREINFO_SYMBOL(_stext);
>  > 751		vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
>    752	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

Sent a fix: [PATCH 1/1] mm: vmalloc: Fix a warning in the crash_save_vmcoreinfo_init()

--
Uladzislau Rezki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux