2024-04-06 20:36:01

by kernel test robot

[permalink] [raw]
Subject: lib/overflow_kunit.c:295:14-19: Unneeded variable: "index". Return "0" on line 297

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f2f80ac809875855ac843f9e5e7480604b5cbff5
commit: 08d45ee84bb2650e237e150caca87cc4ded9b3e2 overflow: Introduce wrapping_assign_add() and wrapping_assign_sub()
date: 5 weeks ago
config: hexagon-randconfig-r053-20240406 (https://download.01.org/0day-ci/archive/20240407/[email protected]/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 546dc2245ffc4cccd0b05b58b7a5955e355a3b27)

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

cocci warnings: (new ones prefixed by >>)
>> lib/overflow_kunit.c:295:14-19: Unneeded variable: "index". Return "0" on line 297

vim +295 lib/overflow_kunit.c

292
293 static int get_index(void)
294 {
> 295 volatile int index = 0;
296 bump_counter();
> 297 return index;
298 }
299

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki