All of lore.kernel.org
 help / color / mirror / Atom feed
* [morse:mpam/snapshot/v6.14-rc1 68/124] drivers/platform/arm64/mpam/mpam_devices.c:352:17: warning: result of comparison of constant 18446744073709551615 with expression of type 'u32' (aka 'unsigned int') is always false
@ 2025-02-09 10:49 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-09 10:49 UTC (permalink / raw)
  To: James Morse; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v6.14-rc1
head:   a185f01212c6b5421e944bef6839d6d6660e2b8b
commit: dfef24fe9ee10fc0c85f7bd6dec37e1fc003db85 [68/124] arm_mpam: Add the class and component structures for ris firmware described
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250209/202502091848.Rcd80pME-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250209/202502091848.Rcd80pME-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/202502091848.Rcd80pME-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/platform/arm64/mpam/mpam_devices.c:352:17: warning: result of comparison of constant 18446744073709551615 with expression of type 'u32' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
     352 |                         if (cache_id == ~0UL) {
         |                             ~~~~~~~~ ^  ~~~~
   1 warning generated.


vim +352 drivers/platform/arm64/mpam/mpam_devices.c

   316	
   317	/*
   318	 * The cacheinfo structures are only populated when CPUs are online.
   319	 * This helper walks the device tree to include offline CPUs too.
   320	 */
   321	static int get_cpumask_from_cache_id(u32 cache_id, u32 cache_level,
   322					     cpumask_t *affinity)
   323	{
   324		int cpu, err;
   325		u32 iter_level;
   326		struct device_node *iter;
   327		unsigned long iter_cache_id;
   328	
   329		if (!acpi_disabled)
   330			return acpi_pptt_get_cpumask_from_cache_id(cache_id, affinity);
   331	
   332		for_each_possible_cpu(cpu) {
   333			iter = of_get_cpu_node(cpu, NULL);
   334			if (!iter) {
   335				pr_err("Failed to find cpu%d device node\n", cpu);
   336				return -ENOENT;
   337			}
   338	
   339			while ((iter = of_find_next_cache_node(iter))) {
   340				err = of_property_read_u32(iter, "cache-level",
   341							   &iter_level);
   342				if (err || iter_level != cache_level) {
   343					of_node_put(iter);
   344					continue;
   345				}
   346	
   347				/*
   348				 * get_cpu_cacheinfo_id() isn't ready until sometime
   349				 * during device_initcall(). Use cache_of_get_id().
   350				 */
   351				iter_cache_id = cache_of_get_id(iter);
 > 352				if (cache_id == ~0UL) {
   353					of_node_put(iter);
   354					continue;
   355				}
   356	
   357				if (iter_cache_id == cache_id)
   358					cpumask_set_cpu(cpu, affinity);
   359	
   360				of_node_put(iter);
   361			}
   362		}
   363	
   364		return 0;
   365	}
   366	

-- 
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:[~2025-02-09 10:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-09 10:49 [morse:mpam/snapshot/v6.14-rc1 68/124] drivers/platform/arm64/mpam/mpam_devices.c:352:17: warning: result of comparison of constant 18446744073709551615 with expression of type 'u32' (aka 'unsigned int') is always false 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.