public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Thomas Weißschuh (Schneider Electric)"
	<thomas.weissschuh@linutronix.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [thomas-weissschuh:b4/auxclock-nanosleep 18/44] kernel/time/benchmarks.c:38:3: warning: variable 'count' is uninitialized when used here
Date: Fri, 20 Mar 2026 18:56:24 +0100	[thread overview]
Message-ID: <202603201851.3zVB9KXq-lkp@intel.com> (raw)

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

             reply	other threads:[~2026-03-20 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 17:56 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-03-20 19:54 [thomas-weissschuh:b4/auxclock-nanosleep 18/44] kernel/time/benchmarks.c:38:3: warning: variable 'count' is uninitialized when used here kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202603201851.3zVB9KXq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=thomas.weissschuh@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox