public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [tip:timers/urgent 1/1] include/linux/jiffies.h:470:36: sparse: sparse: cast truncates bits from constant value (7fffffffffff0bdc becomes ffff0bdc)
@ 2026-04-21 19:56 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-21 19:56 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: oe-kbuild-all, linux-kernel, x86, Thomas Gleixner

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/urgent
head:   4096fd0e8eaea13ebe5206700b33f49635ae18e5
commit: b777b5e09eabeefc6ba80f4296366a4742701103 [1/1] time/jiffies: Inline jiffies_to_msecs() and jiffies_to_usecs()
config: alpha-randconfig-r121-20260421 (https://download.01.org/0day-ci/archive/20260422/202604220307.zk9Kn0Gi-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 15.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260422/202604220307.zk9Kn0Gi-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/202604220307.zk9Kn0Gi-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/firewire/core-card.c: note: in included file (through include/linux/ktime.h, include/linux/timer.h, include/linux/uprobes.h, ...):
>> include/linux/jiffies.h:470:36: sparse: sparse: cast truncates bits from constant value (7fffffffffff0bdc becomes ffff0bdc)
--
   drivers/firewire/core-transaction.c: note: in included file (through include/linux/ktime.h, include/linux/timer.h, include/linux/uprobes.h, ...):
>> include/linux/jiffies.h:470:36: sparse: sparse: cast truncates bits from constant value (7fffffffffff0bdc becomes ffff0bdc)

vim +470 include/linux/jiffies.h

   454	
   455	#if !(USEC_PER_SEC % HZ)
   456	/**
   457	 * jiffies_to_usecs - Convert jiffies to microseconds
   458	 * @j: jiffies value
   459	 *
   460	 * Return: microseconds value
   461	 */
   462	static inline unsigned int jiffies_to_usecs(const unsigned long j)
   463	{
   464		/*
   465		 * Hz usually doesn't go much further MSEC_PER_SEC.
   466		 * jiffies_to_usecs() and usecs_to_jiffies() depend on that.
   467		 */
   468		BUILD_BUG_ON(HZ > USEC_PER_SEC);
   469	
 > 470		return (USEC_PER_SEC / HZ) * j;
   471	}
   472	#else
   473	unsigned int jiffies_to_usecs(const unsigned long j);
   474	#endif
   475	

-- 
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:[~2026-04-21 19:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-21 19:56 [tip:timers/urgent 1/1] include/linux/jiffies.h:470:36: sparse: sparse: cast truncates bits from constant value (7fffffffffff0bdc becomes ffff0bdc) kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox