public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [thomas-weissschuh:b4/auxclock-nanosleep 18/44] kernel/time/benchmarks.c:38:3: warning: variable 'count' is uninitialized when used here
@ 2026-03-20 17:56 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-03-20 17:56 UTC (permalink / raw)
  To: Thomas Weißschuh (Schneider Electric); +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git b4/auxclock-nanosleep
head:   40e3ab4d08362c43874fd99e70d6ef6f57f086ef
commit: 7fe24e0ff2f96db84d1ce465aca76bd42c169ab7 [18/44] benchmarks
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260320/202603201851.3zVB9KXq-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260320/202603201851.3zVB9KXq-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/202603201851.3zVB9KXq-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/time/benchmarks.c:38:3: warning: variable 'count' is uninitialized when used here [-Wuninitialized]
      38 |                 count++;
         |                 ^~~~~
   kernel/time/benchmarks.c:33:11: note: initialize the variable 'count' to silence this warning
      33 |         u64 count;
         |                  ^
         |                   = 0
   kernel/time/benchmarks.c:56:3: warning: variable 'count' is uninitialized when used here [-Wuninitialized]
      56 |                 count++;
         |                 ^~~~~
   kernel/time/benchmarks.c:50:11: note: initialize the variable 'count' to silence this warning
      50 |         u64 count;
         |                  ^
         |                   = 0
   2 warnings generated.


vim +/count +38 kernel/time/benchmarks.c

    29	
    30	static int benchmark_ktime_get_read(void *data, u64 *value)
    31	{
    32		ktime_t end;
    33		u64 count;
    34	
    35		end = ktime_get() + BENCHMARK_TIME;
    36	
    37		do {
  > 38			count++;
    39		} while (ktime_get() < end);
    40	
    41		*value = count;
    42		return 0;
    43	}
    44	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [thomas-weissschuh:b4/auxclock-nanosleep 18/44] kernel/time/benchmarks.c:38:3: warning: variable 'count' is uninitialized when used here
@ 2026-03-20 19:54 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-03-20 19:54 UTC (permalink / raw)
  To: Thomas Weißschuh (Schneider Electric); +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git b4/auxclock-nanosleep
head:   40e3ab4d08362c43874fd99e70d6ef6f57f086ef
commit: 7fe24e0ff2f96db84d1ce465aca76bd42c169ab7 [18/44] benchmarks
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20260321/202603210311.uHxUmzdy-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260321/202603210311.uHxUmzdy-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/202603210311.uHxUmzdy-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/time/benchmarks.c:38:3: warning: variable 'count' is uninitialized when used here [-Wuninitialized]
      38 |                 count++;
         |                 ^~~~~
   kernel/time/benchmarks.c:33:11: note: initialize the variable 'count' to silence this warning
      33 |         u64 count;
         |                  ^
         |                   = 0
   kernel/time/benchmarks.c:56:3: warning: variable 'count' is uninitialized when used here [-Wuninitialized]
      56 |                 count++;
         |                 ^~~~~
   kernel/time/benchmarks.c:50:11: note: initialize the variable 'count' to silence this warning
      50 |         u64 count;
         |                  ^
         |                   = 0
   2 warnings generated.


vim +/count +38 kernel/time/benchmarks.c

    29	
    30	static int benchmark_ktime_get_read(void *data, u64 *value)
    31	{
    32		ktime_t end;
    33		u64 count;
    34	
    35		end = ktime_get() + BENCHMARK_TIME;
    36	
    37		do {
  > 38			count++;
    39		} while (ktime_get() < end);
    40	
    41		*value = count;
    42		return 0;
    43	}
    44	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-20 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 17:56 [thomas-weissschuh:b4/auxclock-nanosleep 18/44] kernel/time/benchmarks.c:38:3: warning: variable 'count' is uninitialized when used here kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-20 19:54 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