From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: arch/riscv/kernel/sys_hwprobe.c:42 hwprobe_arch_id() error: uninitialized symbol 'cpu_id'.
Date: Mon, 9 Dec 2024 12:11:21 +0800 [thread overview]
Message-ID: <202412071537.ce5eoTOq-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Andrew Jones <ajones@ventanamicro.com>
CC: Palmer Dabbelt <palmer@rivosinc.com>
CC: Conor Dooley <conor.dooley@microchip.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b5f217084ab3ddd4bdd03cd437f8e3b7e2d1f5b6
commit: 53b2b22850e1ff9e2729ce8efe2d846ed7d3bff4 RISC-V: Move the hwprobe syscall to its own file
date: 11 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 11 months ago
config: riscv-randconfig-r073-20241207 (https://download.01.org/0day-ci/archive/20241207/202412071537.ce5eoTOq-lkp@intel.com/config)
compiler: riscv64-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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202412071537.ce5eoTOq-lkp@intel.com/
smatch warnings:
arch/riscv/kernel/sys_hwprobe.c:42 hwprobe_arch_id() error: uninitialized symbol 'cpu_id'.
vim +/cpu_id +42 arch/riscv/kernel/sys_hwprobe.c
53b2b22850e1ff Andrew Jones 2023-11-22 17
53b2b22850e1ff Andrew Jones 2023-11-22 18
53b2b22850e1ff Andrew Jones 2023-11-22 19 static void hwprobe_arch_id(struct riscv_hwprobe *pair,
53b2b22850e1ff Andrew Jones 2023-11-22 20 const struct cpumask *cpus)
53b2b22850e1ff Andrew Jones 2023-11-22 21 {
53b2b22850e1ff Andrew Jones 2023-11-22 22 u64 id = -1ULL;
53b2b22850e1ff Andrew Jones 2023-11-22 23 bool first = true;
53b2b22850e1ff Andrew Jones 2023-11-22 24 int cpu;
53b2b22850e1ff Andrew Jones 2023-11-22 25
53b2b22850e1ff Andrew Jones 2023-11-22 26 for_each_cpu(cpu, cpus) {
53b2b22850e1ff Andrew Jones 2023-11-22 27 u64 cpu_id;
53b2b22850e1ff Andrew Jones 2023-11-22 28
53b2b22850e1ff Andrew Jones 2023-11-22 29 switch (pair->key) {
53b2b22850e1ff Andrew Jones 2023-11-22 30 case RISCV_HWPROBE_KEY_MVENDORID:
53b2b22850e1ff Andrew Jones 2023-11-22 31 cpu_id = riscv_cached_mvendorid(cpu);
53b2b22850e1ff Andrew Jones 2023-11-22 32 break;
53b2b22850e1ff Andrew Jones 2023-11-22 33 case RISCV_HWPROBE_KEY_MIMPID:
53b2b22850e1ff Andrew Jones 2023-11-22 34 cpu_id = riscv_cached_mimpid(cpu);
53b2b22850e1ff Andrew Jones 2023-11-22 35 break;
53b2b22850e1ff Andrew Jones 2023-11-22 36 case RISCV_HWPROBE_KEY_MARCHID:
53b2b22850e1ff Andrew Jones 2023-11-22 37 cpu_id = riscv_cached_marchid(cpu);
53b2b22850e1ff Andrew Jones 2023-11-22 38 break;
53b2b22850e1ff Andrew Jones 2023-11-22 39 }
53b2b22850e1ff Andrew Jones 2023-11-22 40
53b2b22850e1ff Andrew Jones 2023-11-22 41 if (first) {
53b2b22850e1ff Andrew Jones 2023-11-22 @42 id = cpu_id;
53b2b22850e1ff Andrew Jones 2023-11-22 43 first = false;
53b2b22850e1ff Andrew Jones 2023-11-22 44 }
53b2b22850e1ff Andrew Jones 2023-11-22 45
53b2b22850e1ff Andrew Jones 2023-11-22 46 /*
53b2b22850e1ff Andrew Jones 2023-11-22 47 * If there's a mismatch for the given set, return -1 in the
53b2b22850e1ff Andrew Jones 2023-11-22 48 * value.
53b2b22850e1ff Andrew Jones 2023-11-22 49 */
53b2b22850e1ff Andrew Jones 2023-11-22 50 if (id != cpu_id) {
53b2b22850e1ff Andrew Jones 2023-11-22 51 id = -1ULL;
53b2b22850e1ff Andrew Jones 2023-11-22 52 break;
53b2b22850e1ff Andrew Jones 2023-11-22 53 }
53b2b22850e1ff Andrew Jones 2023-11-22 54 }
53b2b22850e1ff Andrew Jones 2023-11-22 55
53b2b22850e1ff Andrew Jones 2023-11-22 56 pair->value = id;
53b2b22850e1ff Andrew Jones 2023-11-22 57 }
53b2b22850e1ff Andrew Jones 2023-11-22 58
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-12-09 4:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 4:11 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-30 19:11 arch/riscv/kernel/sys_hwprobe.c:42 hwprobe_arch_id() error: uninitialized symbol 'cpu_id' kernel test robot
2024-01-19 6:04 kernel test robot
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=202412071537.ce5eoTOq-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@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.