All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Drake <dan@reactivated.net>
Cc: oe-kbuild-all@lists.linux.dev, 0day robot <lkp@intel.com>,
	Jason Gunthorpe <jgg@nvidia.com>
Subject: include/linux/bitops.h:279:19: sparse: sparse: cast truncates bits from constant value (ffffffff000 becomes fffff000)
Date: Thu, 01 Oct 2026 03:31:33 +0200	[thread overview]
Message-ID: <202610010359.GypSyCtW-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-10-01  1:32 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=202610010359.GypSyCtW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dan@reactivated.net \
    --cc=jgg@nvidia.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.