From: kernel test robot <lkp@intel.com>
To: Zach Brown <zab@zabbo.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [zab-rpdfs:rpdfs-initial 1/51] fs/rpdfs/block.c:309:6: warning: variable 'now' is used uninitialized whenever '&&' condition is false
Date: Tue, 07 Apr 2026 16:18:58 +0800 [thread overview]
Message-ID: <202604071621.RJ4cJwBm-lkp@intel.com> (raw)
Hi Zach,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/zab/linux-rpdfs.git rpdfs-initial
head: 9a0627207ad856d2a5eb09f3458afb1e34ac10a3
commit: e8e76da7ed715ef67ccc4436f4981a5b39983d9f [1/51] rpdfs: initial commit
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20260407/202604071621.RJ4cJwBm-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260407/202604071621.RJ4cJwBm-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/202604071621.RJ4cJwBm-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/rpdfs/block.c:309:6: warning: variable 'now' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
309 | if (!IS_ERR_OR_NULL(bk) && (now = atomic64_dec_return(&bk->refcount)) == 0)
| ^~~~~~~~~~~~~~~~~~~
fs/rpdfs/block.c:312:15: note: uninitialized use occurs here
312 | WARN_ON_ONCE(now < 0);
| ^~~
include/asm-generic/bug.h:111:25: note: expanded from macro 'WARN_ON_ONCE'
111 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
fs/rpdfs/block.c:309:6: note: remove the '&&' if its condition is always true
309 | if (!IS_ERR_OR_NULL(bk) && (now = atomic64_dec_return(&bk->refcount)) == 0)
| ^~~~~~~~~~~~~~~~~~~~~~
fs/rpdfs/block.c:307:9: note: initialize the variable 'now' to silence this warning
307 | s64 now;
| ^
| = 0
1 warning generated.
--
>> fs/rpdfs/super.c:160:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
160 | case Opt_mkfs:
| ^~~~~~~~
fs/rpdfs/super.c:178:9: note: uninitialized use occurs here
178 | return ret;
| ^~~
fs/rpdfs/super.c:153:9: note: initialize the variable 'ret' to silence this warning
153 | int ret;
| ^
| = 0
1 warning generated.
vim +309 fs/rpdfs/block.c
304
305 static void put_block(struct rpdfs_block *bk)
306 {
307 s64 now;
308
> 309 if (!IS_ERR_OR_NULL(bk) && (now = atomic64_dec_return(&bk->refcount)) == 0)
310 free_block(bk);
311
312 WARN_ON_ONCE(now < 0);
313 WARN_ON_ONCE(now == REMOVAL_REFCOUNT - 1);
314 }
315
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-04-07 8:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202604071621.RJ4cJwBm-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=zab@zabbo.net \
/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