lib/bootconfig.c:69 xbc_free_mem() warn: unsigned '_x' is never less than zero.
From: kernel test robot
Date: Fri Feb 14 2025 - 17:31:33 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 04f41cbf03ec7221ab0b179e336f4c805ee55520
commit: 89f9a1e876b5a7ad884918c03a46831af202c8a0 bootconfig: use memblock_free_late to free xbc memory to buddy
date: 10 months ago
config: riscv-randconfig-r073-20250213 (https://download.01.org/0day-ci/archive/20250215/202502150651.mUSSYUxe-lkp@xxxxxxxxx/config)
compiler: riscv32-linux-gcc (GCC) 14.2.0
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/202502150651.mUSSYUxe-lkp@xxxxxxxxx/
smatch warnings:
lib/bootconfig.c:69 xbc_free_mem() warn: unsigned '_x' is never less than zero.
vim +/_x +69 lib/bootconfig.c
63
64 static inline void __init xbc_free_mem(void *addr, size_t size, bool early)
65 {
66 if (early)
67 memblock_free(addr, size);
68 else if (addr)
> 69 memblock_free_late(__pa(addr), size);
70 }
71
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki