From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFDFF24CEEA for ; Thu, 14 May 2026 02:49:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778726967; cv=none; b=lWIlWcWEXmLc4hakuQoU6o5JirZZUABhSzIe0O8PWuagUCLQP9u2BupBT2HE7/sNgVkgn9B1sDC1fdVmQTcEQMF7OpEpsVVwPGz3UPcGUMa9JwlJtnmN625vOV9huHmjglkHpiP2Wikaf1E+CQAm+KU9EvnnC2a/GXqctmWFkjA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778726967; c=relaxed/simple; bh=whsaYoRhc9Xlu30b+OUHRCx3h5VsfphowYJ9Z706rC8=; h=Date:From:To:Cc:Subject:Message-ID; b=lpcUABKuv2dxlfXA1U3yxeqClbE4MJMlUSLRwzahHZf3SlkCPRTS7FVAsVIT0AtmwaLApMtf62vcI9K5H0WPGKouTsGip2c5HMcFuNT7781qFERVN0T+KZ9QJHXjISycTQTiMLS/Dlmy8KFD8SkUHECksfdNxWcl6qH4yn1g++o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HvU/5pOb; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HvU/5pOb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778726966; x=1810262966; h=date:from:to:cc:subject:message-id; bh=whsaYoRhc9Xlu30b+OUHRCx3h5VsfphowYJ9Z706rC8=; b=HvU/5pObzPFY26Z8X0mISQTFICHvQ7DV96+mIp/0FDTdSXPgGbNjoqgl 9SE/HxrBrFP+Sv5L/nfTv0Rs40D6OVuSe6Y4KDdSKs7VHIZRg83HpDdgq oNOPCRAJCxO4DpOl0CmRH4BxAJwAjwXNx7/UYVys2st0StPAp5r/HUXSM kOmXQ8zFeZmGSY+Y/zo+uFZeSgdVtVw9N0uae/Uy4PVPpPo7wLJSXJxpT 7TMDUYK5wAvdUN/kqruS/TAZoO0XMQqYoT6EYCPe/x5j4E0nHMYGWFuxR BmFZIstOLuYJo+4/1w3po05Sy6OpTGBFJd7nfQyyKE3guifVkSVeAQXvv g==; X-CSE-ConnectionGUID: XUm5guuSSiiAqhmrydGdMA== X-CSE-MsgGUID: yiQRtSzxQg6jcgppjt/dxw== X-IronPort-AV: E=McAfee;i="6800,10657,11785"; a="79618298" X-IronPort-AV: E=Sophos;i="6.23,233,1770624000"; d="scan'208";a="79618298" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2026 19:49:25 -0700 X-CSE-ConnectionGUID: lEDgBNDgRsekscSaeGlSKQ== X-CSE-MsgGUID: F3ayx5HaQcy6UqnbtukQBA== X-ExtLoop1: 1 Received: from lkp-server01.sh.intel.com (HELO dca79079c3eb) ([10.239.97.150]) by fmviesa003.fm.intel.com with ESMTP; 13 May 2026 19:49:23 -0700 Received: from kbuild by dca79079c3eb with local (Exim 4.98.2) (envelope-from ) id 1wNM8X-000000005hR-0Drc; Thu, 14 May 2026 02:49:21 +0000 Date: Thu, 14 May 2026 10:48:45 +0800 From: kernel test robot To: Jason Gunthorpe Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Joerg Roedel , Kevin Tian , Vasant Hegde Subject: include/linux/bitops.h:273:19: sparse: sparse: cast truncates bits from constant value (ffffffffff000 becomes fffff000) Message-ID: <202605141052.09y2OBtB-lkp@intel.com> User-Agent: s-nail v14.9.25 Precedence: bulk X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: e1914add2799225a87502051415fc5c32aeb02ae commit: 879ced2bab1ba95e98fac56c9503791183bc7cbb iommupt: Add the AMD IOMMU v1 page table format date: 6 months ago config: um-randconfig-r134-20260514 (https://download.01.org/0day-ci/archive/20260514/202605141052.09y2OBtB-lkp@intel.com/config) compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3) sparse: v0.6.5-rc1 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605141052.09y2OBtB-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 | Fixes: 879ced2bab1b ("iommupt: Add the AMD IOMMU v1 page table format") | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202605141052.09y2OBtB-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/iommu/generic_pt/fmt/iommu_amdv1.c: note: in included file (through drivers/iommu/generic_pt/fmt/../pt_log2.h, drivers/iommu/generic_pt/fmt/../pt_defs.h, drivers/iommu/generic_pt/fmt/iommu_template.h): >> include/linux/bitops.h:273:19: sparse: sparse: cast truncates bits from constant value (ffffffffff000 becomes fffff000) include/linux/bitops.h:278:16: sparse: sparse: cast truncates bits from constant value (ffffffffff000 becomes fffff000) vim +273 include/linux/bitops.h c320592f3f2a1e Wolfram Sang 2025-01-07 261 952043ac12a117 Steven Whitehouse 2009-04-23 262 /** 952043ac12a117 Steven Whitehouse 2009-04-23 263 * __ffs64 - find first set bit in a 64 bit word 952043ac12a117 Steven Whitehouse 2009-04-23 264 * @word: The 64 bit word 952043ac12a117 Steven Whitehouse 2009-04-23 265 * 4945cca232ce8b Geert Uytterhoeven 2021-02-25 266 * On 64 bit arches this is a synonym for __ffs 952043ac12a117 Steven Whitehouse 2009-04-23 267 * The result is not defined if no bits are set, so check that @word 952043ac12a117 Steven Whitehouse 2009-04-23 268 * is non-zero before calling this. 952043ac12a117 Steven Whitehouse 2009-04-23 269 */ 6606c8c7e81886 Kees Cook 2025-08-04 270 static inline __attribute_const__ unsigned int __ffs64(u64 word) 952043ac12a117 Steven Whitehouse 2009-04-23 271 { 952043ac12a117 Steven Whitehouse 2009-04-23 272 #if BITS_PER_LONG == 32 952043ac12a117 Steven Whitehouse 2009-04-23 @273 if (((u32)word) == 0UL) 952043ac12a117 Steven Whitehouse 2009-04-23 274 return __ffs((u32)(word >> 32)) + 32; 952043ac12a117 Steven Whitehouse 2009-04-23 275 #elif BITS_PER_LONG != 64 952043ac12a117 Steven Whitehouse 2009-04-23 276 #error BITS_PER_LONG not 32 or 64 952043ac12a117 Steven Whitehouse 2009-04-23 277 #endif 952043ac12a117 Steven Whitehouse 2009-04-23 278 return __ffs((unsigned long)word); 952043ac12a117 Steven Whitehouse 2009-04-23 279 } 952043ac12a117 Steven Whitehouse 2009-04-23 280 :::::: The code at line 273 was first introduced by commit :::::: 952043ac12a117d8e94bddd9088338d7ad20ca7d bitops: Add __ffs64 bitop :::::: TO: Steven Whitehouse :::::: CC: Steven Whitehouse -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki