linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [morse:mpam/snapshot/v5.15 90/139] include/linux/cacheinfo.h:115:10: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295'
@ 2021-11-12 21:51 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-12 21:51 UTC (permalink / raw)
  To: Rob Herring; +Cc: kbuild-all, linux-kernel, James Morse

[-- Attachment #1: Type: text/plain, Size: 2544 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v5.15
head:   ce3629841262f725a5f3a327403fcaf0e604a85e
commit: 7cfc8ff4c2167d8b7da45a3a5f7f7f98de31bcde [90/139] cacheinfo: Allow for >32-bit cache 'id'
config: um-i386_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?id=7cfc8ff4c2167d8b7da45a3a5f7f7f98de31bcde
        git remote add morse https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git
        git fetch --no-tags morse mpam/snapshot/v5.15
        git checkout 7cfc8ff4c2167d8b7da45a3a5f7f7f98de31bcde
        # save the attached .config to linux build tree
        make W=1 ARCH=um SUBARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/base/cacheinfo.c:12:
   include/linux/cacheinfo.h: In function 'get_cpu_cacheinfo_id':
>> include/linux/cacheinfo.h:115:10: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow]
     115 |   return ~0ULL;
         |          ^
   include/linux/cacheinfo.h:121:11: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow]
     121 |    return ~0ULL;
         |           ^
   include/linux/cacheinfo.h:125:9: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow]
     125 |  return ~0ULL;
         |         ^


vim +115 include/linux/cacheinfo.h

   104	
   105	/*
   106	 * Get the id of the cache associated with @cpu at level @level.
   107	 * cpuhp lock must be held.
   108	 */
   109	static inline unsigned long get_cpu_cacheinfo_id(int cpu, int level)
   110	{
   111		struct cpu_cacheinfo *ci = get_cpu_cacheinfo(cpu);
   112		int i;
   113	
   114		if (!ci->info_list)
 > 115			return ~0ULL;
   116	
   117		for (i = 0; i < ci->num_leaves; i++) {
   118			if (ci->info_list[i].level == level) {
   119				if (ci->info_list[i].attributes & CACHE_ID)
   120					return ci->info_list[i].id;
   121				return ~0ULL;
   122			}
   123		}
   124	
   125		return ~0ULL;
   126	}
   127	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 9860 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-12 21:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 21:51 [morse:mpam/snapshot/v5.15 90/139] include/linux/cacheinfo.h:115:10: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295' 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;
as well as URLs for NNTP newsgroup(s).