[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202512242156.fyUcX7CR-lkp@intel.com>
Date: Wed, 24 Dec 2025 21:44:28 +0800
From: kernel test robot <lkp@...el.com>
To: Khaled Saleh <khaled.saleh.req@...il.com>, rostedt@...dmis.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
linux-kernel@...r.kernel.org,
Khaled Saleh <khaled.saleh.req@...il.com>
Subject: Re: [PATCH] trace: make ftrace likely counters atomic
Hi Khaled,
kernel test robot noticed the following build errors:
[auto build test ERROR on trace/for-next]
[also build test ERROR on linus/master v6.19-rc2 next-20251219]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Khaled-Saleh/trace-make-ftrace-likely-counters-atomic/20251224-044106
base: https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace for-next
patch link: https://lore.kernel.org/r/20251223203715.10954-1-khaled.saleh.req%40gmail.com
patch subject: [PATCH] trace: make ftrace likely counters atomic
config: hexagon-randconfig-002-20251224 (https://download.01.org/0day-ci/archive/20251224/202512242156.fyUcX7CR-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 4ef602d446057dabf5f61fb221669ecbeda49279)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251224/202512242156.fyUcX7CR-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512242156.fyUcX7CR-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/trace/trace_branch.c:219:19: error: incompatible pointer types passing 'unsigned long *' to parameter of type 'atomic_long_t *' (aka 'atomic_t *') [-Wincompatible-pointer-types]
219 | atomic_long_inc(&f->data.correct);
| ^~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:3589:32: note: passing argument to parameter 'v' here
3589 | atomic_long_inc(atomic_long_t *v)
| ^
kernel/trace/trace_branch.c:221:18: error: incompatible pointer types passing 'unsigned long *' to parameter of type 'atomic_long_t *' (aka 'atomic_t *') [-Wincompatible-pointer-types]
221 | atomic_long_inc(&f->data.incorrect);
| ^~~~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:3589:32: note: passing argument to parameter 'v' here
3589 | atomic_long_inc(atomic_long_t *v)
| ^
2 errors generated.
vim +219 kernel/trace/trace_branch.c
198
199 void ftrace_likely_update(struct ftrace_likely_data *f, int val,
200 int expect, int is_constant)
201 {
202 unsigned long flags = user_access_save();
203
204 /* A constant is always correct */
205 if (is_constant) {
206 f->constant++;
207 val = expect;
208 }
209 /*
210 * I would love to have a trace point here instead, but the
211 * trace point code is so inundated with unlikely and likely
212 * conditions that the recursive nightmare that exists is too
213 * much to try to get working. At least for now.
214 */
215 trace_likely_condition(f, val, expect);
216
217 /* FIXME: Make this atomic! */
218 if (val == expect) {
> 219 atomic_long_inc(&f->data.correct);
220 } else {
221 atomic_long_inc(&f->data.incorrect);
222 }
223
224 user_access_restore(flags);
225 }
226 EXPORT_SYMBOL(ftrace_likely_update);
227
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists