All of lore.kernel.org
 help / color / mirror / Atom feed
* include/linux/bitops.h:279:19: sparse: sparse: cast truncates bits from constant value (ffffffff000 becomes fffff000)
@ 2026-10-01  1:31 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-01  1:31 UTC (permalink / raw)
  To: Daniel Drake; +Cc: oe-kbuild-all, 0day robot, Jason Gunthorpe

tree:   https://github.com/intel-lab-lkp/linux/commits/Daniel-Drake-via-B4-Relay/iommu_pt-Fix-test_pgsize_boundary-failure-on-narrow-OA-formats/20260927-140900
head:   b7ecf4c7cbd115e08bbd71e2959ce77385075e36
commit: 2f4cbf2903187f8af69f9521be028ce204cdd222 iommu/generic_pt: Add Broadcom BCM2712 page table format
date:   4 days ago
config: powerpc-randconfig-r2308-20261001 (https://download.01.org/0day-ci/archive/20261001/202610010359.GypSyCtW-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261001/202610010359.GypSyCtW-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/202610010359.GypSyCtW-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/iommu/generic_pt/fmt/iommu_bcm2712.c: note: in included file (through include/linux/log2.h, include/asm-generic/div64.h, arch/powerpc/include/generated/asm/div64.h, include/linux/math.h, ...):
>> include/linux/bitops.h:279:19: sparse: sparse: cast truncates bits from constant value (ffffffff000 becomes fffff000)
   include/linux/bitops.h:284:37: sparse: sparse: cast truncates bits from constant value (ffffffff000 becomes fffff000)
>> include/linux/bitops.h:279:19: sparse: sparse: cast truncates bits from constant value (ffffffff000 becomes fffff000)
   include/linux/bitops.h:284:37: sparse: sparse: cast truncates bits from constant value (ffffffff000 becomes fffff000)

vim +279 include/linux/bitops.h

c320592f3f2a1e Wolfram Sang       2025-01-07  267  
952043ac12a117 Steven Whitehouse  2009-04-23  268  /**
952043ac12a117 Steven Whitehouse  2009-04-23  269   * __ffs64 - find first set bit in a 64 bit word
952043ac12a117 Steven Whitehouse  2009-04-23  270   * @word: The 64 bit word
952043ac12a117 Steven Whitehouse  2009-04-23  271   *
4945cca232ce8b Geert Uytterhoeven 2021-02-25  272   * On 64 bit arches this is a synonym for __ffs
952043ac12a117 Steven Whitehouse  2009-04-23  273   * The result is not defined if no bits are set, so check that @word
952043ac12a117 Steven Whitehouse  2009-04-23  274   * is non-zero before calling this.
952043ac12a117 Steven Whitehouse  2009-04-23  275   */
6606c8c7e81886 Kees Cook          2025-08-04  276  static inline __attribute_const__ unsigned int __ffs64(u64 word)
952043ac12a117 Steven Whitehouse  2009-04-23  277  {
952043ac12a117 Steven Whitehouse  2009-04-23  278  #if BITS_PER_LONG == 32
952043ac12a117 Steven Whitehouse  2009-04-23 @279  	if (((u32)word) == 0UL)
952043ac12a117 Steven Whitehouse  2009-04-23  280  		return __ffs((u32)(word >> 32)) + 32;
952043ac12a117 Steven Whitehouse  2009-04-23  281  #elif BITS_PER_LONG != 64
952043ac12a117 Steven Whitehouse  2009-04-23  282  #error BITS_PER_LONG not 32 or 64
952043ac12a117 Steven Whitehouse  2009-04-23  283  #endif
952043ac12a117 Steven Whitehouse  2009-04-23  284  	return __ffs((unsigned long)word);
952043ac12a117 Steven Whitehouse  2009-04-23  285  }
952043ac12a117 Steven Whitehouse  2009-04-23  286  

--
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-10-01  1:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01  1:31 include/linux/bitops.h:279:19: sparse: sparse: cast truncates bits from constant value (ffffffff000 becomes fffff000) kernel test robot

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.