[openeuler:OLK-6.6 2041/2041] arch/loongarch/mm/cache.c:69:29: warning: variable 'way_size' set but not used

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 010e974aad58e203f1e68707107db00593fcf851 commit: 7bd845b17aab36ac5d381557b797845404aaeb57 [2041/2041] LoongArch: Update the flush cache policy config: loongarch-randconfig-001-20250318 (https://download.01.org/0day-ci/archive/20250318/202503182233.88LCSaAj-lkp@i...) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250318/202503182233.88LCSaAj-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503182233.88LCSaAj-lkp@intel.com/ All warnings (new ones prefixed by >>): arch/loongarch/mm/cache.c: In function 'flush_cache_last_level':
arch/loongarch/mm/cache.c:69:29: warning: variable 'way_size' set but not used [-Wunused-but-set-variable] 69 | int i, j, nr_nodes, way_size; | ^~~~~~~~
vim +/way_size +69 arch/loongarch/mm/cache.c 65 66 static void flush_cache_last_level(unsigned int leaf) 67 { 68 u64 addr;
69 int i, j, nr_nodes, way_size; 70 struct cache_desc *cdesc = current_cpu_data.cache_leaves + leaf; 71 72 nr_nodes = loongson_sysconf.nr_nodes; 73 74 addr = CSR_DMW1_BASE; 75 iocsr_write8(0x1, 0x280); 76 way_size = cdesc->sets * cdesc->linesz; 77 do { 78 for (i = 0; i < (cdesc->ways * 3); i++) { 79 for (j = 0; j < (cdesc->sets); j++) { 80 READ_ONCE(*(u32 *)addr); 81 addr += cdesc->linesz; 82 } 83 } 84 addr += 0x100000000000; 85 } while (--nr_nodes > 0); 86 } 87
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot