All of lore.kernel.org
 help / color / mirror / Atom feed
* [norov:fns2 3/8] lib/test_bitops.c:56:39: error: variable 'tmp' set but not used
@ 2024-05-06 11:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-06 11:39 UTC (permalink / raw)
  To: Yury Norov; +Cc: oe-kbuild-all

tree:   https://github.com/norov/linux fns2
head:   f92306cbaa708996e4cabe1c802e4d71e2e0ad77
commit: 4bb80c67057ee84c93316be9f688e969a1a6ad63 [3/8] lib/test_bitops: Add benchmark test for fns()
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20240506/202405061900.4HgQJjvK-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 37ae4ad0eef338776c7e2cffb3896153d43dcd90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240506/202405061900.4HgQJjvK-lkp@intel.com/reproduce)

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/202405061900.4HgQJjvK-lkp@intel.com/

All errors (new ones prefixed by >>):

>> lib/test_bitops.c:56:39: error: variable 'tmp' set but not used [-Werror,-Wunused-but-set-variable]
      56 |         static volatile __used unsigned long tmp __initdata;
         |                                              ^
   1 error generated.


vim +/tmp +56 lib/test_bitops.c

    52	
    53	static int __init test_fns(void)
    54	{
    55		static unsigned long buf[10000] __initdata;
  > 56		static volatile __used unsigned long tmp __initdata;
    57		unsigned int i, n;
    58		ktime_t time;
    59	
    60		get_random_bytes(buf, sizeof(buf));
    61		time = ktime_get();
    62	
    63		for (n = 0; n < BITS_PER_LONG; n++)
    64			for (i = 0; i < 10000; i++)
    65				tmp = fns(buf[i], n);
    66	
    67		time = ktime_get() - time;
    68		pr_err("fns:  %18llu ns\n", time);
    69	
    70		return 0;
    71	}
    72	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-06 11:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-06 11:39 [norov:fns2 3/8] lib/test_bitops.c:56:39: error: variable 'tmp' set but not used kernel test robot

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.