[mark:arm64/percpu-fixup 11/17] kernel/trace/ftrace.c:8628:3: warning: implicit conversion from 'unsigned long' to 'u32' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295

kernel test robot <[email protected]> Sat, 01 Aug 2026 17:41:59 +0800
Newsgroups dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/percpu-fixup
head:   f14d3c444eacd9a722e55ff59e30cce2b1ac8985
commit: 55cddf3387a963a59fa5f7e0df28d64fc2d8aa51 [11/17] arm64: percpu: Implement preemptible read/write ops
config: arm64-randconfig-002-20260801 (https://download.01.org/0day-ci/archive/20260801/[email protected]/config)
compiler: clang version 21.1.8 (https://github.com/llvm/llvm-project 2078da43e25a4623cab2d0d60decddf709aaea28)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260801/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> kernel/trace/ftrace.c:8628:3: warning: implicit conversion from 'unsigned long' to 'u32' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
    8628 |                 this_cpu_write(tr->array_buffer.data->ftrace_ignore_pid,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8629 |                                FTRACE_PID_IGNORE);
         |                                ~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:500:34: note: expanded from macro 'this_cpu_write'
     500 | #define this_cpu_write(pcp, val)        __pcpu_size_call(this_cpu_write_, pcp, val)
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:371:11: note: expanded from macro '__pcpu_size_call'
     371 |                 case 4: stem##4(variable, __VA_ARGS__);break;           \
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   <scratch space>:66:1: note: expanded from here
      66 | this_cpu_write_4
         | ^
   arch/arm64/include/asm/percpu.h:282:36: note: expanded from macro 'this_cpu_write_4'
     282 |         _pcp_wrap(__percpu_write_32, pcp, (unsigned long)val)
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
   arch/arm64/include/asm/percpu.h:260:13: note: expanded from macro '_pcp_wrap'
     260 |         op(&(pcp), __VA_ARGS__);                                        \
         |         ~~         ^~~~~~~~~~~
   kernel/trace/ftrace.c:8898:3: warning: implicit conversion from 'unsigned long' to 'u32' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
    8898 |                 this_cpu_write(tr->array_buffer.data->ftrace_ignore_pid,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8899 |                                FTRACE_PID_IGNORE);
         |                                ~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:500:34: note: expanded from macro 'this_cpu_write'
     500 | #define this_cpu_write(pcp, val)        __pcpu_size_call(this_cpu_write_, pcp, val)
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:371:11: note: expanded from macro '__pcpu_size_call'
     371 |                 case 4: stem##4(variable, __VA_ARGS__);break;           \
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   <scratch space>:154:1: note: expanded from here
     154 | this_cpu_write_4
         | ^
   arch/arm64/include/asm/percpu.h:282:36: note: expanded from macro 'this_cpu_write_4'
     282 |         _pcp_wrap(__percpu_write_32, pcp, (unsigned long)val)
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
   arch/arm64/include/asm/percpu.h:260:13: note: expanded from macro '_pcp_wrap'
     260 |         op(&(pcp), __VA_ARGS__);                                        \
         |         ~~         ^~~~~~~~~~~
   2 warnings generated.


vim +8628 kernel/trace/ftrace.c

87354059881ce9 Steven Rostedt (Red Hat  2014-07-22  8613) 
345ddcc882d889 Steven Rostedt (Red Hat  2016-04-22  8614) static void
345ddcc882d889 Steven Rostedt (Red Hat  2016-04-22  8615) ftrace_filter_pid_sched_switch_probe(void *data, bool preempt,
fa2c3254d7cfff Valentin Schneider       2022-01-20  8616  				     struct task_struct *prev,
9c2136be0878c8 Delyan Kratunov          2022-05-11  8617  				     struct task_struct *next,
9c2136be0878c8 Delyan Kratunov          2022-05-11  8618  				     unsigned int prev_state)
978f3a45d9499c Steven Rostedt           2008-12-04  8619  {
345ddcc882d889 Steven Rostedt (Red Hat  2016-04-22  8620) 	struct trace_array *tr = data;
345ddcc882d889 Steven Rostedt (Red Hat  2016-04-22  8621) 	struct trace_pid_list *pid_list;
b3b1e6ededa433 Steven Rostedt (VMware   2020-03-19  8622) 	struct trace_pid_list *no_pid_list;
978f3a45d9499c Steven Rostedt           2008-12-04  8623  
345ddcc882d889 Steven Rostedt (Red Hat  2016-04-22  8624) 	pid_list = rcu_dereference_sched(tr->function_pids);
b3b1e6ededa433 Steven Rostedt (VMware   2020-03-19  8625) 	no_pid_list = rcu_dereference_sched(tr->function_no_pids);
978f3a45d9499c Steven Rostedt           2008-12-04  8626  
b3b1e6ededa433 Steven Rostedt (VMware   2020-03-19  8627) 	if (trace_ignore_this_task(pid_list, no_pid_list, next))
1c5eb4481e0151 Steven Rostedt (VMware   2020-01-09 @8628) 		this_cpu_write(tr->array_buffer.data->ftrace_ignore_pid,
717e3f5ebc823e Steven Rostedt (VMware   2020-03-19  8629) 			       FTRACE_PID_IGNORE);
717e3f5ebc823e Steven Rostedt (VMware   2020-03-19  8630) 	else
717e3f5ebc823e Steven Rostedt (VMware   2020-03-19  8631) 		this_cpu_write(tr->array_buffer.data->ftrace_ignore_pid,
717e3f5ebc823e Steven Rostedt (VMware   2020-03-19  8632) 			       next->pid);
978f3a45d9499c Steven Rostedt           2008-12-04  8633  }
978f3a45d9499c Steven Rostedt           2008-12-04  8634  

:::::: The code at line 8628 was first introduced by commit
:::::: 1c5eb4481e0151d579f738175497f998840f7bbc tracing: Rename trace_buffer to array_buffer

:::::: TO: Steven Rostedt (VMware) <[email protected]>
:::::: CC: Steven Rostedt (VMware) <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki