Re: [paulmckrcu:non-rcu/next 39/40] include/linux/hrtimer.h:355:16: sparse: sparse: incorrect type in return expression (different modifiers)

"Paul E. McKenney" <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <a3953bb5-ca5c-42ea-b78c-8c60be0982d7@paulmck-laptop>
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/[email protected]/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/[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]/
> 
> 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 <[email protected]>
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 <[email protected]>

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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.