From: kernel test robot <lkp@intel.com>
To: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>
Cc: oe-kbuild-all@lists.linux.dev, Anup Patel <anup@brainfault.org>
Subject: [avpatel:riscv_trace_support_v6 61/80] kernel/trace/trace.c:8186:23: warning: shift count is negative
Date: Sun, 08 Nov 2026 01:15:57 +0100 [thread overview]
Message-ID: <202611080147.jyg69Cch-lkp@intel.com> (raw)
tree: https://github.com/avpatel/linux.git riscv_trace_support_v6
head: f98be19c4d4f657fa0ed2a17aa8ef5ece29fe8dc
commit: badc75240dd73faad1081d9c12b9cd0f9cc6a145 [61/80] riscv: add ptrace requests for hardware breakpoints
config: riscv-randconfig-r2304-20261107 (https://download.01.org/0day-ci/archive/20261108/202611080147.jyg69Cch-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
sparse: v0.6.5-rc1-21-g84ec0658
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261108/202611080147.jyg69Cch-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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611080147.jyg69Cch-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from kernel/trace/trace.c:18:
In file included from include/linux/writeback.h:13:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:12:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:12:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
1209 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
| ~~~~~~~~~~ ^
In file included from kernel/trace/trace.c:58:
In file included from kernel/trace/trace.h:15:
include/linux/hw_breakpoint.h:137:20: error: redefinition of 'flush_ptrace_hw_breakpoint'
137 | static inline void flush_ptrace_hw_breakpoint(struct task_struct *tsk) { }
| ^
arch/riscv/include/asm/hw_breakpoint.h:58:20: note: previous definition is here
58 | static inline void flush_ptrace_hw_breakpoint(struct task_struct *task) { }
| ^
>> kernel/trace/trace.c:8186:23: warning: shift count is negative [-Wshift-count-negative]
8186 | !((1ULL << i) & TOP_LEVEL_TRACE_FLAGS)) {
| ^~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace.c:518:9: note: expanded from macro 'TOP_LEVEL_TRACE_FLAGS'
518 | TRACE_ITER(PROF_TEXT_OFFSET) | FPROFILE_DEFAULT_FLAGS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace.h:1528:42: note: expanded from macro 'TRACE_ITER'
1528 | (TRACE_ITER_##flag##_BIT < 0 ? 0 : 1ULL << (TRACE_ITER_##flag##_BIT))
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace.c:8720:48: warning: shift count is negative [-Wshift-count-negative]
8720 | tr->trace_flags = global_trace.trace_flags & ~ZEROED_TRACE_FLAGS;
| ^~~~~~~~~~~~~~~~~~
kernel/trace/trace.c:522:28: note: expanded from macro 'ZEROED_TRACE_FLAGS'
522 | (TRACE_ITER(EVENT_FORK) | TRACE_ITER(FUNC_FORK) | TRACE_ITER(TRACE_PRINTK) | \
| ^~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace.h:1528:42: note: expanded from macro 'TRACE_ITER'
1528 | (TRACE_ITER_##flag##_BIT < 0 ? 0 : 1ULL << (TRACE_ITER_##flag##_BIT))
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace.c:8904:21: warning: shift count is negative [-Wshift-count-negative]
8904 | if ((1ULL << i) & ZEROED_TRACE_FLAGS)
| ^~~~~~~~~~~~~~~~~~
kernel/trace/trace.c:522:28: note: expanded from macro 'ZEROED_TRACE_FLAGS'
522 | (TRACE_ITER(EVENT_FORK) | TRACE_ITER(FUNC_FORK) | TRACE_ITER(TRACE_PRINTK) | \
| ^~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace.h:1528:42: note: expanded from macro 'TRACE_ITER'
1528 | (TRACE_ITER_##flag##_BIT < 0 ? 0 : 1ULL << (TRACE_ITER_##flag##_BIT))
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings and 1 error generated.
vim +8186 kernel/trace/trace.c
a8259075074fb0 Steven Rostedt 2009-02-26 8173
16270145ce6b90 Steven Rostedt (Red Hat 2015-09-30 8174) static void create_trace_options_dir(struct trace_array *tr)
a8259075074fb0 Steven Rostedt 2009-02-26 8175 {
a8259075074fb0 Steven Rostedt 2009-02-26 8176 struct dentry *t_options;
16270145ce6b90 Steven Rostedt (Red Hat 2015-09-30 8177) bool top_level = tr == &global_trace;
a8259075074fb0 Steven Rostedt 2009-02-26 8178 int i;
a8259075074fb0 Steven Rostedt 2009-02-26 8179
2b6080f28c7cc3 Steven Rostedt 2012-05-11 8180 t_options = trace_options_init_dentry(tr);
a8259075074fb0 Steven Rostedt 2009-02-26 8181 if (!t_options)
a8259075074fb0 Steven Rostedt 2009-02-26 8182 return;
a8259075074fb0 Steven Rostedt 2009-02-26 8183
16270145ce6b90 Steven Rostedt (Red Hat 2015-09-30 8184) for (i = 0; trace_options[i]; i++) {
16270145ce6b90 Steven Rostedt (Red Hat 2015-09-30 8185) if (top_level ||
bbec8e28cac592 Masami Hiramatsu (Google 2025-10-31 @8186) !((1ULL << i) & TOP_LEVEL_TRACE_FLAGS)) {
2b6080f28c7cc3 Steven Rostedt 2012-05-11 8187 create_trace_option_core_file(tr, trace_options[i], i);
a8259075074fb0 Steven Rostedt 2009-02-26 8188 }
16270145ce6b90 Steven Rostedt (Red Hat 2015-09-30 8189) }
bbec8e28cac592 Masami Hiramatsu (Google 2025-10-31 8190) }
a8259075074fb0 Steven Rostedt 2009-02-26 8191
:::::: The code at line 8186 was first introduced by commit
:::::: bbec8e28cac5928c20052c489cb2e345e6bd4271 tracing: Allow tracer to add more than 32 options
:::::: TO: Masami Hiramatsu (Google) <mhiramat@kernel.org>
:::::: CC: Masami Hiramatsu (Google) <mhiramat@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-11-08 0:16 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=202611080147.jyg69Cch-lkp@intel.com \
--to=lkp@intel.com \
--cc=anup@brainfault.org \
--cc=himanshu.chauhan@oss.qualcomm.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.