* [paulmckrcu:non-rcu/next 39/40] include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers)
@ 2026-08-13 5:39 kernel test robot
2026-08-18 23:19 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-08-13 5:39 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: oe-kbuild-all
tree: https://github.com/paulmckrcu/linux non-rcu/next
head: e39a12053df0951120ff6283177e0d5179feda45
commit: c3d1cae06fc1ad9b6948fa0ca8a93415607ea8b1 [39/40] hrtimer: Mark the hrtimer_sleeper structure's ->task field __private
config: arc-randconfig-r132-20260813 (https://download.01.org/0day-ci/archive/20260813/202608131347.dXTHYsI1-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 13.4.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260813/202608131347.dXTHYsI1-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/202608131347.dXTHYsI1-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/time/sleep_timeout.c: note: in included file (through include/linux/alarmtimer.h, include/linux/posix-timers.h, include/linux/sched/signal.h):
>> include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers) @@ expected struct task_struct * @@ got struct task_struct [noderef] * @@
include/linux/hrtimer.h:355:16: sparse: expected struct task_struct *
include/linux/hrtimer.h:355:16: sparse: got struct task_struct [noderef] *
>> include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers) @@ expected struct task_struct * @@ got struct task_struct [noderef] * @@
include/linux/hrtimer.h:355:16: sparse: expected struct task_struct *
include/linux/hrtimer.h:355:16: sparse: got struct task_struct [noderef] *
--
kernel/time/hrtimer.c: note: in included file:
>> include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers) @@ expected struct task_struct * @@ got struct task_struct [noderef] * @@
include/linux/hrtimer.h:355:16: sparse: expected struct task_struct *
include/linux/hrtimer.h:355:16: sparse: got struct task_struct [noderef] *
>> include/linux/hrtimer.h:359:9: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected struct task_struct [noderef] *volatile @@ got struct task_struct *t @@
include/linux/hrtimer.h:359:9: sparse: expected struct task_struct [noderef] *volatile
include/linux/hrtimer.h:359:9: sparse: got struct task_struct *t
>> include/linux/hrtimer.h:359:9: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected struct task_struct [noderef] *volatile @@ got struct task_struct *t @@
include/linux/hrtimer.h:359:9: sparse: expected struct task_struct [noderef] *volatile
include/linux/hrtimer.h:359:9: sparse: got struct task_struct *t
>> include/linux/hrtimer.h:359:9: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected struct task_struct [noderef] *volatile @@ got struct task_struct *t @@
include/linux/hrtimer.h:359:9: sparse: expected struct task_struct [noderef] *volatile
include/linux/hrtimer.h:359:9: sparse: got struct task_struct *t
>> include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers) @@ expected struct task_struct * @@ got struct task_struct [noderef] * @@
include/linux/hrtimer.h:355:16: sparse: expected struct task_struct *
include/linux/hrtimer.h:355:16: sparse: got struct task_struct [noderef] *
>> include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers) @@ expected struct task_struct * @@ got struct task_struct [noderef] * @@
include/linux/hrtimer.h:355:16: sparse: expected struct task_struct *
include/linux/hrtimer.h:355:16: sparse: got struct task_struct [noderef] *
>> include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers) @@ expected struct task_struct * @@ got struct task_struct [noderef] * @@
include/linux/hrtimer.h:355:16: sparse: expected struct task_struct *
include/linux/hrtimer.h:355:16: sparse: got struct task_struct [noderef] *
vim +355 include/linux/hrtimer.h
341
342 extern int nanosleep_copyout(struct restart_block *, struct timespec64 *);
343 extern long hrtimer_nanosleep(ktime_t rqtp, const enum hrtimer_mode mode,
344 const clockid_t clockid);
345
346 extern int schedule_hrtimeout_range(ktime_t *expires, u64 delta,
347 const enum hrtimer_mode mode);
348 extern int schedule_hrtimeout_range_clock(ktime_t *expires,
349 u64 delta,
350 const enum hrtimer_mode mode,
351 clockid_t clock_id);
352 extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode);
353 static inline struct task_struct *hrtimer_sleeper_task_get(struct hrtimer_sleeper *sl)
354 {
> 355 return READ_ONCE(ACCESS_PRIVATE(sl, task));
356 }
357 static inline void hrtimer_sleeper_task_set(struct hrtimer_sleeper *sl, struct task_struct *t)
358 {
> 359 WRITE_ONCE(ACCESS_PRIVATE(sl, task), t);
360 }
361
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [paulmckrcu:non-rcu/next 39/40] include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers)
2026-08-13 5:39 [paulmckrcu:non-rcu/next 39/40] include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers) kernel test robot
@ 2026-08-18 23:19 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2026-08-18 23:19 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all
On Thu, Aug 13, 2026 at 01:39:51PM +0800, kernel test robot wrote:
> tree: https://github.com/paulmckrcu/linux non-rcu/next
> head: e39a12053df0951120ff6283177e0d5179feda45
> commit: c3d1cae06fc1ad9b6948fa0ca8a93415607ea8b1 [39/40] hrtimer: Mark the hrtimer_sleeper structure's ->task field __private
> config: arc-randconfig-r132-20260813 (https://download.01.org/0day-ci/archive/20260813/202608131347.dXTHYsI1-lkp@intel.com/config)
> compiler: arc-linux-gcc (GCC) 13.4.0
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260813/202608131347.dXTHYsI1-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/202608131347.dXTHYsI1-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> kernel/time/sleep_timeout.c: note: in included file (through include/linux/alarmtimer.h, include/linux/posix-timers.h, include/linux/sched/signal.h):
> >> include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers) @@ expected struct task_struct * @@ got struct task_struct [noderef] * @@
Thank you for the testing!
Does the patch below clear things up for you?
Thanx, Paul
------------------------------------------------------------------------
commit 6597c140656fe857a51debfd684e66e09636fa45
Author: Paul E. McKenney <paulmck@kernel.org>
Date: Tue Aug 18 16:17:47 2026 -0700
squash! hrtimer: Mark the hrtimer_sleeper structure's ->task field __private
[ paulmck: Apply kernel test robot feedback. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 5c04423e8e900b..b919ee508fb494 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -73,7 +73,7 @@ enum hrtimer_mode {
*/
struct hrtimer_sleeper {
struct hrtimer timer;
- struct task_struct __private *task;
+ struct task_struct *__private task;
};
static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-18 23:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 5:39 [paulmckrcu:non-rcu/next 39/40] include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers) kernel test robot
2026-08-18 23:19 ` Paul E. McKenney
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.