From: kernel test robot <lkp@intel.com>
To: Nam Cao <namcao@linutronix.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: include/linux/hrtimer.h:348:9: sparse: sparse: dereference of noderef expression
Date: Mon, 7 Apr 2025 21:15:56 +0800 [thread overview]
Message-ID: <202504072155.5UAZjYGU-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0af2f6be1b4281385b618cb86ad946eded089ac8
commit: 04257da0c99c9d4ff7c5bb93046482e1f7d34938 hrtimers: Make callback function pointer private
date: 2 days ago
config: powerpc-randconfig-r112-20250407 (https://download.01.org/0day-ci/archive/20250407/202504072155.5UAZjYGU-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce: (https://download.01.org/0day-ci/archive/20250407/202504072155.5UAZjYGU-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/202504072155.5UAZjYGU-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/tty/serial/xilinx_uartps.c: note: in included file (through include/linux/pm.h, include/linux/device.h, include/linux/platform_device.h):
>> include/linux/hrtimer.h:348:9: sparse: sparse: dereference of noderef expression
>> include/linux/hrtimer.h:348:9: sparse: sparse: dereference of noderef expression
vim +348 include/linux/hrtimer.h
4346f65426cbce Oliver Hartkopp 2008-04-30 327
8f02e3563bb582 Nam Cao 2024-10-31 328 /**
8f02e3563bb582 Nam Cao 2024-10-31 329 * hrtimer_update_function - Update the timer's callback function
8f02e3563bb582 Nam Cao 2024-10-31 330 * @timer: Timer to update
8f02e3563bb582 Nam Cao 2024-10-31 331 * @function: New callback function
8f02e3563bb582 Nam Cao 2024-10-31 332 *
8f02e3563bb582 Nam Cao 2024-10-31 333 * Only safe to call if the timer is not enqueued. Can be called in the callback function if the
8f02e3563bb582 Nam Cao 2024-10-31 334 * timer is not enqueued at the same time (see the comments above HRTIMER_STATE_ENQUEUED).
8f02e3563bb582 Nam Cao 2024-10-31 335 */
8f02e3563bb582 Nam Cao 2024-10-31 336 static inline void hrtimer_update_function(struct hrtimer *timer,
8f02e3563bb582 Nam Cao 2024-10-31 337 enum hrtimer_restart (*function)(struct hrtimer *))
8f02e3563bb582 Nam Cao 2024-10-31 338 {
2ea97b76d6712b Thomas Gleixner 2025-02-07 339 #ifdef CONFIG_PROVE_LOCKING
8f02e3563bb582 Nam Cao 2024-10-31 340 guard(raw_spinlock_irqsave)(&timer->base->cpu_base->lock);
8f02e3563bb582 Nam Cao 2024-10-31 341
8f02e3563bb582 Nam Cao 2024-10-31 342 if (WARN_ON_ONCE(hrtimer_is_queued(timer)))
8f02e3563bb582 Nam Cao 2024-10-31 343 return;
8f02e3563bb582 Nam Cao 2024-10-31 344
8f02e3563bb582 Nam Cao 2024-10-31 345 if (WARN_ON_ONCE(!function))
8f02e3563bb582 Nam Cao 2024-10-31 346 return;
2ea97b76d6712b Thomas Gleixner 2025-02-07 347 #endif
8f02e3563bb582 Nam Cao 2024-10-31 @348 timer->function = function;
8f02e3563bb582 Nam Cao 2024-10-31 349 }
8f02e3563bb582 Nam Cao 2024-10-31 350
:::::: The code at line 348 was first introduced by commit
:::::: 8f02e3563bb5824eb01c94f2c75f1dcee2d05625 hrtimers: Introduce hrtimer_update_function()
:::::: TO: Nam Cao <namcao@linutronix.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-04-07 13:16 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=202504072155.5UAZjYGU-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namcao@linutronix.de \
--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.