From: SJ Park <sj@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: SJ Park <sj@kernel.org>, oe-kbuild-all@lists.linux.dev
Subject: Re: [sj:damon/next 8/115] mm/damon/core.c:2897:6: warning: variable 'sz' is used uninitialized whenever 'if' condition is false
Date: Sat, 28 Nov 2026 09:27:02 -0800 [thread overview]
Message-ID: <20261128172703.87664-1-sj@kernel.org> (raw)
In-Reply-To: <20261128131145.Nl6CvXC3-lkp@intel.com>
On Sat, 28 Nov 2026 13:18:16 +0100 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next
> head: 48de80bb219cbce999fe877fcf3256d863908567
> commit: 6c2c2ebe06271b1f829f6eac8b56baab5ca71b11 [8/115] mm/damon/core: do not update stat for core filter rejecting region
> config: powerpc-randconfig-2200-20261128 (https://download.01.org/0day-ci/archive/20261128/20261128131145.Nl6CvXC3-lkp@intel.com/config)
> compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 578b1f2d6a9776b63cbb6b86f4cca6208d429f48)
> smatch: v0.5.0-9187-g5189e3fb
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261128/20261128131145.Nl6CvXC3-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/20261128131145.Nl6CvXC3-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> mm/damon/core.c:2897:6: warning: variable 'sz' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
> 2897 | if (c->ops.apply_scheme) {
> | ^~~~~~~~~~~~~~~~~~~
> mm/damon/core.c:2930:23: note: uninitialized use occurs here
> 2930 | damos_update_stat(s, sz, sz_applied, sz_ops_filter_passed);
> | ^~
> mm/damon/core.c:2897:2: note: remove the 'if' if its condition is always true
> 2897 | if (c->ops.apply_scheme) {
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> mm/damon/core.c:2864:18: note: initialize the variable 'sz' to silence this warning
> 2864 | unsigned long sz;
> | ^
> | = 0
> 1 warning generated.
Thank you for this report! I added a fix to my tree.
Thanks,
SJ
[...]
prev parent reply other threads:[~2026-11-28 17:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 12:18 [sj:damon/next 8/115] mm/damon/core.c:2897:6: warning: variable 'sz' is used uninitialized whenever 'if' condition is false kernel test robot
2026-11-28 17:27 ` SJ Park [this message]
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=20261128172703.87664-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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 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.