[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111130536.5l8wU7zU-lkp@intel.com>
Date: Sat, 13 Nov 2021 05:51:43 +0800
From: kernel test robot <lkp@...el.com>
To: Rob Herring <robh@...nel.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
James Morse <james.morse@....com>
Subject: [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'
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@...el.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
Download attachment ".config.gz" of type "application/gzip" (9860 bytes)
Powered by blists - more mailing lists