All of lore.kernel.org
 help / color / mirror / Atom feed
* [avpatel:riscv_trace_support_v6 61/80] kernel/trace/trace.c:8186:23: warning: shift count is negative
@ 2026-11-08  0:15 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-08  0:15 UTC (permalink / raw)
  To: Himanshu Chauhan; +Cc: oe-kbuild-all, Anup Patel

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

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

only message in thread, other threads:[~2026-11-08  0:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-08  0:15 [avpatel:riscv_trace_support_v6 61/80] kernel/trace/trace.c:8186:23: warning: shift count is negative 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.