From: kernel test robot <lkp@intel.com>
To: Mark Salter <msalter@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev,
"Justin M. Forbes" <jforbes@fedoraproject.org>,
Jeremy Cline <jeremycline@linux.microsoft.com>
Subject: [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.
Date: Mon, 19 Oct 2026 16:09:00 +0200 [thread overview]
Message-ID: <202610191657.xSS2rjdB-lkp@intel.com> (raw)
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
reply other threads:[~2026-10-19 14:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202610191657.xSS2rjdB-lkp@intel.com \
--to=lkp@intel.com \
--cc=jeremycline@linux.microsoft.com \
--cc=jforbes@fedoraproject.org \
--cc=msalter@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.