All of lore.kernel.org
 help / color / mirror / Atom feed
* [snitzer:kernel-7.3/snitzer-nfs-fixes-canary 5821/7369] arch/arm64/kernel/setup.c:220 init_secureboot_mode() warn: unsigned 'chosen' is never less than zero.
@ 2026-10-19 14:09 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-19 14:09 UTC (permalink / raw)
  To: Mark Salter; +Cc: oe-kbuild-all, Justin M. Forbes, Jeremy Cline

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git kernel-7.3/snitzer-nfs-fixes-canary
head:   c0c4fcd143f7ac71dcea2f5b67325fcca37563de
commit: 10f592edc6b4ce30ca4b2edd412198afdd2b6cd6 [5821/7369] arm64: add early lockdown for secure boot
config: arm64-randconfig-r2202-20261019 (https://download.01.org/0day-ci/archive/20261019/202610191657.xSS2rjdB-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 15.3.0
smatch: v0.5.0-9187-g5189e3fb

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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610191657.xSS2rjdB-lkp@intel.com/

smatch warnings:
arch/arm64/kernel/setup.c:220 init_secureboot_mode() warn: unsigned 'chosen' is never less than zero.

vim +/chosen +220 arch/arm64/kernel/setup.c

   211	
   212	static void __init init_secureboot_mode(void)
   213	{
   214		void *fdt = initial_boot_params;
   215		u64 chosen;
   216		const __be32 *prop;
   217		int len;
   218	
   219		chosen = fdt_path_offset(fdt, "/chosen");
 > 220		if (chosen < 0)
   221			return;
   222	
   223		prop = fdt_getprop(fdt, chosen, "secure-boot-mode", &len);
   224		if (!prop || len != sizeof(u32))
   225			return;
   226	
   227		efi_set_secure_boot((enum efi_secureboot_mode)fdt32_to_cpu(*prop));
   228	}
   229	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-19 14:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 14:09 [snitzer:kernel-7.3/snitzer-nfs-fixes-canary 5821/7369] arch/arm64/kernel/setup.c:220 init_secureboot_mode() warn: unsigned 'chosen' is never less than zero kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.