All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
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 19:43:30 +0800	[thread overview]
Message-ID: <202101151917.n2Edpk0M-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Jiaxun Yang <jiaxun.yang@flygoat.com>
CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
CC: Tiezhu Yang <yangtiezhu@loongson.cn>

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
:::::: branch date: 5 hours ago
:::::: commit date: 11 days ago
compiler: mips-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@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 = &current_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(a)lists.01.org

             reply	other threads:[~2021-01-15 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 11:43 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-15 15:33 [linux-next:master 1027/3956] arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is modified but its new value is never used kernel test robot
2021-01-15 15:33 ` kernel test robot

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=202101151917.n2Edpk0M-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 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.