From: kernel test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [tglx-devel:timers/posix 12/19] kernel/time/posix-timers.c:59:3: error: use of undeclared identifier 'ret'
Date: Sun, 23 Feb 2025 05:49:55 +0800 [thread overview]
Message-ID: <202502230516.tlfb3osu-lkp@intel.com> (raw)
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
reply other threads:[~2025-02-22 21:50 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=202502230516.tlfb3osu-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tglx@linutronix.de \
/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.