* [hnaz-mm:master 478/481] kernel/synchro-test.c:393:49: warning: variable 'zeros' set but not used
@ 2022-03-29 14:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-29 14:02 UTC (permalink / raw)
To: David Howells
Cc: llvm, kbuild-all, linux-kernel, Johannes Weiner, Ingo Molnar,
Adrian Bunk, Randy Dunlap, Michel Lespinasse, Andrew Morton,
Linux Memory Management List
tree: https://github.com/hnaz/linux-mm master
head: 673977c1d5c4c5bc15abf8f01ebaddc66116a9cd
commit: 52880bd2b8272052d5ccf95f94704a959796c9f6 [478/481] mutex subsystem, synchro-test module
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20220329/202203292115.plWUiMYU-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/hnaz/linux-mm/commit/52880bd2b8272052d5ccf95f94704a959796c9f6
git remote add hnaz-mm https://github.com/hnaz/linux-mm
git fetch --no-tags hnaz-mm master
git checkout 52880bd2b8272052d5ccf95f94704a959796c9f6
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
kernel/synchro-test.c:267:2: error: implicit declaration of function 'complete_and_exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
complete_and_exit(&sp_comp[N], 0);
^
kernel/synchro-test.c:268:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
kernel/synchro-test.c:288:2: error: implicit declaration of function 'complete_and_exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
complete_and_exit(&mx_comp[N], 0);
^
kernel/synchro-test.c:289:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
kernel/synchro-test.c:309:2: error: implicit declaration of function 'complete_and_exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
complete_and_exit(&sm_comp[N], 0);
^
kernel/synchro-test.c:310:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
kernel/synchro-test.c:332:2: error: implicit declaration of function 'complete_and_exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
complete_and_exit(&rd_comp[N], 0);
^
kernel/synchro-test.c:333:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
kernel/synchro-test.c:355:2: error: implicit declaration of function 'complete_and_exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
complete_and_exit(&wr_comp[N], 0);
^
kernel/synchro-test.c:356:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
kernel/synchro-test.c:383:2: error: implicit declaration of function 'complete_and_exit' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
complete_and_exit(&dg_comp[N], 0);
^
kernel/synchro-test.c:384:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
>> kernel/synchro-test.c:393:49: warning: variable 'zeros' set but not used [-Wunused-but-set-variable]
unsigned int tot = 0, max = 0, min = UINT_MAX, zeros = 0, cnt;
^
1 warning and 12 errors generated.
vim +/zeros +393 kernel/synchro-test.c
390
391 static unsigned int total(const char *what, unsigned int counts[], int num)
392 {
> 393 unsigned int tot = 0, max = 0, min = UINT_MAX, zeros = 0, cnt;
394 int loop;
395
396 for (loop = 0; loop < num; loop++) {
397 cnt = counts[loop];
398
399 if (cnt == 0) {
400 zeros++;
401 min = 0;
402 continue;
403 }
404
405 tot += cnt;
406 if (tot > max)
407 max = tot;
408 if (tot < min)
409 min = tot;
410 }
411
412 if (verbose && tot > 0) {
413 printk("%s:", what);
414
415 for (loop = 0; loop < num; loop++) {
416 cnt = counts[loop];
417
418 if (cnt == 0)
419 printk(" zzz");
420 else
421 printk(" %d%%", cnt * 100 / tot);
422 }
423
424 printk("\n");
425 }
426
427 return tot;
428 }
429
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-29 14:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29 14:02 [hnaz-mm:master 478/481] kernel/synchro-test.c:393:49: warning: variable 'zeros' set but not used kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).