From: kernel test robot <lkp@intel.com>
To: Xiubo Li <xiubli@redhat.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
ceph-devel@vger.kernel.org, Jeff Layton <jlayton@kernel.org>
Subject: [ceph-client:testing 13/14] fs/ceph/snap.c:438:14: warning: variable '_realm' is uninitialized when used here
Date: Thu, 17 Feb 2022 03:33:42 +0800 [thread overview]
Message-ID: <202202170318.82LIXBXX-lkp@intel.com> (raw)
tree: https://github.com/ceph/ceph-client.git testing
head: 91e59cfc6ca1a2bf594f60474996c71047edd1e5
commit: 7c7e63bc9910b15ffd1f791838ff0a919058f97c [13/14] ceph: eliminate the recursion when rebuilding the snap context
config: hexagon-randconfig-r005-20220216 (https://download.01.org/0day-ci/archive/20220217/202202170318.82LIXBXX-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0e628a783b935c70c80815db6c061ec84f884af5)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/ceph/ceph-client/commit/7c7e63bc9910b15ffd1f791838ff0a919058f97c
git remote add ceph-client https://github.com/ceph/ceph-client.git
git fetch --no-tags ceph-client testing
git checkout 7c7e63bc9910b15ffd1f791838ff0a919058f97c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/ceph/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/ceph/snap.c:438:14: warning: variable '_realm' is uninitialized when used here [-Wuninitialized]
list_del(&_realm->rebuild_item);
^~~~~~
fs/ceph/snap.c:430:33: note: initialize the variable '_realm' to silence this warning
struct ceph_snap_realm *_realm, *child;
^
= NULL
1 warning generated.
vim +/_realm +438 fs/ceph/snap.c
417
418 /*
419 * rebuild snap context for the given realm and all of its children.
420 */
421 static void rebuild_snap_realms(struct ceph_snap_realm *realm,
422 struct list_head *dirty_realms)
423 {
424 LIST_HEAD(realm_queue);
425 int last = 0;
426
427 list_add_tail(&realm->rebuild_item, &realm_queue);
428
429 while (!list_empty(&realm_queue)) {
430 struct ceph_snap_realm *_realm, *child;
431
432 /*
433 * If the last building failed dues to memory
434 * issue, just empty the realm_queue and return
435 * to avoid infinite loop.
436 */
437 if (last < 0) {
> 438 list_del(&_realm->rebuild_item);
439 continue;
440 }
441
442 _realm = list_first_entry(&realm_queue,
443 struct ceph_snap_realm,
444 rebuild_item);
445 last = build_snap_context(_realm, &realm_queue, dirty_realms);
446 dout("rebuild_snap_realms %llx %p, %s\n", _realm->ino, _realm,
447 last > 0 ? "is deferred" : !last ? "succeeded" : "failed");
448
449 list_for_each_entry(child, &_realm->children, child_item)
450 list_add_tail(&child->rebuild_item, &realm_queue);
451
452 /* last == 1 means need to build parent first */
453 if (last <= 0)
454 list_del(&_realm->rebuild_item);
455 }
456 }
457
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next reply other threads:[~2022-02-16 19:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 19:33 kernel test robot [this message]
2022-02-16 19:52 ` [ceph-client:testing 13/14] fs/ceph/snap.c:438:14: warning: variable '_realm' is uninitialized when used here Jeff Layton
2022-02-17 0:59 ` Xiubo Li
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=202202170318.82LIXBXX-lkp@intel.com \
--to=lkp@intel.com \
--cc=ceph-devel@vger.kernel.org \
--cc=jlayton@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=llvm@lists.linux.dev \
--cc=xiubli@redhat.com \
/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