mips: cacheinfo: Remove unnecessary increment of level
authorSouptick Joarder <jrdr.linux@gmail.com>
Sat, 16 Jan 2021 08:40:00 +0000 (14:10 +0530)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 27 Jan 2021 20:48:23 +0000 (21:48 +0100)
kernel test robot throws below warning ->

arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is
modified but its new value is never used. [unreadVariable]

Remove unnecessary increment of level at the end.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/cacheinfo.c

index 5f9d0eb..53d8ea7 100644 (file)
@@ -107,10 +107,8 @@ static int __populate_cache_leaves(unsigned int cpu)
                level++;
        }
 
-       if (c->tcache.waysize) {
+       if (c->tcache.waysize)
                populate_cache(tcache, this_leaf, level, CACHE_TYPE_UNIFIED);
-               level++;
-       }
 
        this_cpu_ci->cpu_map_populated = true;