* [tglx-devel:timers/posix 12/19] kernel/time/posix-timers.c:59:3: error: use of undeclared identifier 'ret'
@ 2025-02-22 21:49 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-22 21:49 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git timers/posix
head: 9d4caab4067bd0c9023b7e98205b0747dece9f66
commit: 2f36f99979f62c4d147b7443d56aa95e426fcd6f [12/19] posix-timers: Switch to per process storage
config: s390-randconfig-002-20250223 (https://download.01.org/0day-ci/archive/20250223/202502230516.tlfb3osu-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250223/202502230516.tlfb3osu-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/202502230516.tlfb3osu-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/time/posix-timers.c:59:3: error: use of undeclared identifier 'ret'
ret = xa_insert(&sig->posix_timer_store, id, timer, GFP_KERNEL);
^
kernel/time/posix-timers.c:60:8: error: use of undeclared identifier 'ret'
if (!ret)
^
kernel/time/posix-timers.c:62:7: error: use of undeclared identifier 'ret'
if (ret != -EBUSY)
^
kernel/time/posix-timers.c:63:11: error: use of undeclared identifier 'ret'
return ret;
^
kernel/time/posix-timers.c:351:2: error: use of undeclared identifier 'new_timer_id'; did you mean 'new_timer'?
new_timer_id = posix_timer_add(new_timer);
^~~~~~~~~~~~
new_timer
kernel/time/posix-timers.c:333:19: note: 'new_timer' declared here
struct k_itimer *new_timer;
^
kernel/time/posix-timers.c:351:15: error: incompatible integer to pointer conversion assigning to 'struct k_itimer *' from 'int' [-Wint-conversion]
new_timer_id = posix_timer_add(new_timer);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/time/posix-timers.c:352:6: error: use of undeclared identifier 'new_timer_id'; did you mean 'new_timer'?
if (new_timer_id < 0) {
^~~~~~~~~~~~
new_timer
kernel/time/posix-timers.c:333:19: note: 'new_timer' declared here
struct k_itimer *new_timer;
^
kernel/time/posix-timers.c:354:10: error: use of undeclared identifier 'new_timer_id'; did you mean 'new_timer'?
return new_timer_id;
^~~~~~~~~~~~
new_timer
kernel/time/posix-timers.c:333:19: note: 'new_timer' declared here
struct k_itimer *new_timer;
^
kernel/time/posix-timers.c:354:10: error: incompatible pointer to integer conversion returning 'struct k_itimer *' from a function with result type 'int' [-Wint-conversion]
return new_timer_id;
^~~~~~~~~~~~
kernel/time/posix-timers.c:357:21: error: use of undeclared identifier 'new_timer_id'; did you mean 'new_timer'?
new_timer->it_id = new_timer_id;
^~~~~~~~~~~~
new_timer
kernel/time/posix-timers.c:333:19: note: 'new_timer' declared here
struct k_itimer *new_timer;
^
kernel/time/posix-timers.c:389:60: error: use of undeclared identifier 'new_timer_id'; did you mean 'new_timer'?
if (copy_to_user(created_timer_id, &new_timer_id, sizeof (new_timer_id))) {
^~~~~~~~~~~~
new_timer
kernel/time/posix-timers.c:333:19: note: 'new_timer' declared here
struct k_itimer *new_timer;
^
kernel/time/posix-timers.c:389:38: error: use of undeclared identifier 'new_timer_id'; did you mean 'new_timer'?
if (copy_to_user(created_timer_id, &new_timer_id, sizeof (new_timer_id))) {
^~~~~~~~~~~~
new_timer
kernel/time/posix-timers.c:333:19: note: 'new_timer' declared here
struct k_itimer *new_timer;
^
12 errors generated.
vim +/ret +59 kernel/time/posix-timers.c
49
50 static int posix_timer_add(struct k_itimer *timer)
51 {
52 struct signal_struct *sig = current->signal;
53
54 for (unsigned int cnt = 0; cnt <= INT_MAX; cnt++) {
55 /* Get the next timer ID and clamp it to positive space */
56 unsigned int id = (atomic_inc_return(&sig->next_posix_timer_id) - 1) & INT_MAX;
57
58 /* xa_insert() fails with -EBUSY when @id contains a timer already */
> 59 ret = xa_insert(&sig->posix_timer_store, id, timer, GFP_KERNEL);
60 if (!ret)
61 return id;
62 if (ret != -EBUSY)
63 return ret;
64 cond_resched();
65 }
66 /* POSIX return code when no timer ID could be allocated */
67 return -EAGAIN;
68 }
69
--
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:[~2025-02-22 21:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-22 21:49 [tglx-devel:timers/posix 12/19] kernel/time/posix-timers.c:59:3: error: use of undeclared identifier 'ret' 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.