From: kernel test robot <rong.a.chen@intel.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Tiezhu Yang <yangtiezhu@loongson.cn>
Subject: [linux-next:master 1027/3956] arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is modified but its new value is never used.
Date: Fri, 15 Jan 2021 23:33:38 +0800 [thread overview]
Message-ID: <20210115153338.GB399595@shao2-debian> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25
commit: e8bb8f28233d88f4ad89fdf83d54bbc4a8ee40f2 [1027/3956] MIPS: cacheinfo: Add missing VCache
compiler: mips-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <rong.a.chen@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is modified but its new value is never used. [unreadVariable]
level++;
^
vim +/level +112 arch/mips/kernel/cacheinfo.c
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 76
ef462f3b64e9fb0c Justin Chen 2016-12-07 77 static int __populate_cache_leaves(unsigned int cpu)
ef462f3b64e9fb0c Justin Chen 2016-12-07 78 {
ef462f3b64e9fb0c Justin Chen 2016-12-07 79 struct cpuinfo_mips *c = ¤t_cpu_data;
ef462f3b64e9fb0c Justin Chen 2016-12-07 80 struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
ef462f3b64e9fb0c Justin Chen 2016-12-07 81 struct cacheinfo *this_leaf = this_cpu_ci->info_list;
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 82 int level = 1;
ef462f3b64e9fb0c Justin Chen 2016-12-07 83
ef462f3b64e9fb0c Justin Chen 2016-12-07 84 if (c->icache.waysize) {
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 85 /* I/D caches are per core */
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 86 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 87 populate_cache(dcache, this_leaf, level, CACHE_TYPE_DATA);
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 88 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 89 populate_cache(icache, this_leaf, level, CACHE_TYPE_INST);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 90 level++;
ef462f3b64e9fb0c Justin Chen 2016-12-07 91 } else {
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 92 populate_cache(dcache, this_leaf, level, CACHE_TYPE_UNIFIED);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 93 level++;
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 94 }
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 95
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 96 if (c->vcache.waysize) {
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 97 /* Vcache is per core as well */
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 98 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 99 populate_cache(vcache, this_leaf, level, CACHE_TYPE_UNIFIED);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 100 level++;
ef462f3b64e9fb0c Justin Chen 2016-12-07 101 }
ef462f3b64e9fb0c Justin Chen 2016-12-07 102
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 103 if (c->scache.waysize) {
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 104 /* Scache is per cluster */
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 105 fill_cpumask_cluster(cpu, &this_leaf->shared_cpu_map);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 106 populate_cache(scache, this_leaf, level, CACHE_TYPE_UNIFIED);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 107 level++;
3b1313eb32c499d4 Vladimir Kondratiev 2019-11-24 108 }
ef462f3b64e9fb0c Justin Chen 2016-12-07 109
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 110 if (c->tcache.waysize) {
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 111 populate_cache(tcache, this_leaf, level, CACHE_TYPE_UNIFIED);
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 @112 level++;
e8bb8f28233d88f4 Jiaxun Yang 2020-12-30 113 }
ef462f3b64e9fb0c Justin Chen 2016-12-07 114
b8bea8a5e5d942e6 Vladimir Kondratiev 2019-07-16 115 this_cpu_ci->cpu_map_populated = true;
b8bea8a5e5d942e6 Vladimir Kondratiev 2019-07-16 116
ef462f3b64e9fb0c Justin Chen 2016-12-07 117 return 0;
ef462f3b64e9fb0c Justin Chen 2016-12-07 118 }
ef462f3b64e9fb0c Justin Chen 2016-12-07 119
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2021-01-15 15:34 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=20210115153338.GB399595@shao2-debian \
--to=rong.a.chen@intel.com \
--cc=jiaxun.yang@flygoat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=tsbogend@alpha.franken.de \
--cc=yangtiezhu@loongson.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox