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/traps.c:62 dump_instr() error: uninitialized symbol 'val'.
Date: Mon, 27 Nov 2023 06:39:44 +0800 [thread overview]
Message-ID: <202311270307.vlK7NGyN-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Yunhui Cui <cuiyunhui@bytedance.com>
CC: Palmer Dabbelt <palmer@rivosinc.com>
CC: "Björn Töpel" <bjorn@rivosinc.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d2da77f431ac49b5763b88751a75f70daa46296c
commit: b8a03a634129b61a7ec69ece4460297ffbd790dc riscv: add userland instruction dump to RISC-V splats
date: 3 weeks ago
:::::: branch date: 2 hours ago
:::::: commit date: 3 weeks ago
config: riscv-randconfig-r071-20231126 (https://download.01.org/0day-ci/archive/20231127/202311270307.vlK7NGyN-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231127/202311270307.vlK7NGyN-lkp@intel.com/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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311270307.vlK7NGyN-lkp@intel.com/
New smatch warnings:
arch/riscv/kernel/traps.c:62 dump_instr() error: uninitialized symbol 'val'.
Old smatch warnings:
arch/riscv/include/asm/syscall.h:88 syscall_handler() warn: inconsistent indenting
vim +/val +62 arch/riscv/kernel/traps.c
b8a03a634129b6 Yunhui Cui 2023-09-12 50
b8a03a634129b6 Yunhui Cui 2023-09-12 51 static void dump_instr(const char *loglvl, struct pt_regs *regs)
eb165bfa8eafc3 Björn Töpel 2023-01-19 52 {
eb165bfa8eafc3 Björn Töpel 2023-01-19 53 char str[sizeof("0000 ") * 12 + 2 + 1], *p = str;
eb165bfa8eafc3 Björn Töpel 2023-01-19 54 const u16 *insns = (u16 *)instruction_pointer(regs);
eb165bfa8eafc3 Björn Töpel 2023-01-19 55 long bad;
eb165bfa8eafc3 Björn Töpel 2023-01-19 56 u16 val;
eb165bfa8eafc3 Björn Töpel 2023-01-19 57 int i;
eb165bfa8eafc3 Björn Töpel 2023-01-19 58
eb165bfa8eafc3 Björn Töpel 2023-01-19 59 for (i = -10; i < 2; i++) {
b8a03a634129b6 Yunhui Cui 2023-09-12 60 bad = copy_code(regs, &val, &insns[i]);
eb165bfa8eafc3 Björn Töpel 2023-01-19 61 if (!bad) {
eb165bfa8eafc3 Björn Töpel 2023-01-19 @62 p += sprintf(p, i == 0 ? "(%04hx) " : "%04hx ", val);
eb165bfa8eafc3 Björn Töpel 2023-01-19 63 } else {
eb165bfa8eafc3 Björn Töpel 2023-01-19 64 printk("%sCode: Unable to access instruction at 0x%px.\n",
eb165bfa8eafc3 Björn Töpel 2023-01-19 65 loglvl, &insns[i]);
eb165bfa8eafc3 Björn Töpel 2023-01-19 66 return;
eb165bfa8eafc3 Björn Töpel 2023-01-19 67 }
eb165bfa8eafc3 Björn Töpel 2023-01-19 68 }
eb165bfa8eafc3 Björn Töpel 2023-01-19 69 printk("%sCode: %s\n", loglvl, str);
eb165bfa8eafc3 Björn Töpel 2023-01-19 70 }
eb165bfa8eafc3 Björn Töpel 2023-01-19 71
:::::: The code at line 62 was first introduced by commit
:::::: eb165bfa8eafc3d306e34b238e53aafb35dce102 riscv: Add instruction dump to RISC-V splats
:::::: TO: Björn Töpel <bjorn@rivosinc.com>
:::::: CC: Palmer Dabbelt <palmer@rivosinc.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-11-26 22:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-26 22:39 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-30 12:39 arch/riscv/kernel/traps.c:62 dump_instr() error: uninitialized symbol 'val' 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=202311270307.vlK7NGyN-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.