From: kernel test robot <lkp@intel.com>
To: Dave Jiang <dave.jiang@intel.com>, linux-cxl@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
dave@stgolabs.net, jonathan.cameron@huawei.com,
alison.schofield@intel.com, vishal.l.verma@intel.com,
ira.weiny@intel.com, dan.j.williams@intel.com
Subject: Re: [PATCH v2 3/3] cxl: Clean up cxl_nvdimm devices when removing nvdimm_bus
Date: Thu, 12 Feb 2026 14:01:32 +0800 [thread overview]
Message-ID: <202602121343.8IGnsS7f-lkp@intel.com> (raw)
In-Reply-To: <20260211232630.480509-4-dave.jiang@intel.com>
Hi Dave,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 63fbf275fa9f18f7020fb8acf54fa107e51d0f23]
url: https://github.com/intel-lab-lkp/linux/commits/Dave-Jiang/cxl-Move-devm_cxl_add_nvdimm_bridge-to-cxl_pmem-ko/20260212-073008
base: 63fbf275fa9f18f7020fb8acf54fa107e51d0f23
patch link: https://lore.kernel.org/r/20260211232630.480509-4-dave.jiang%40intel.com
patch subject: [PATCH v2 3/3] cxl: Clean up cxl_nvdimm devices when removing nvdimm_bus
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20260212/202602121343.8IGnsS7f-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/20260212/202602121343.8IGnsS7f-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/202602121343.8IGnsS7f-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/cxl/pmem.c:407:7: warning: variable 'cxl_nvd' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
407 | if (dev->driver) {
| ^~~~~~~~~~~
drivers/cxl/pmem.c:416:10: note: uninitialized use occurs here
416 | cxlmd = cxl_nvd->cxlmd;
| ^~~~~~~
drivers/cxl/pmem.c:407:3: note: remove the 'if' if its condition is always true
407 | if (dev->driver) {
| ^~~~~~~~~~~~~~~~
drivers/cxl/pmem.c:399:28: note: initialize the variable 'cxl_nvd' to silence this warning
399 | struct cxl_nvdimm *cxl_nvd;
| ^
| = NULL
1 warning generated.
vim +407 drivers/cxl/pmem.c
8fdcb1704f61a8 Dan Williams 2021-06-15 396
19398821b25a9c Dan Williams 2023-01-20 397 static int detach_nvdimm(struct device *dev, void *data)
19398821b25a9c Dan Williams 2023-01-20 398 {
19398821b25a9c Dan Williams 2023-01-20 399 struct cxl_nvdimm *cxl_nvd;
5f761998c93e30 Dave Jiang 2026-02-11 400 struct cxl_memdev *cxlmd;
19398821b25a9c Dan Williams 2023-01-20 401 bool release = false;
19398821b25a9c Dan Williams 2023-01-20 402
19398821b25a9c Dan Williams 2023-01-20 403 if (!is_cxl_nvdimm(dev))
19398821b25a9c Dan Williams 2023-01-20 404 return 0;
19398821b25a9c Dan Williams 2023-01-20 405
7f569e917b7866 Li Ming 2024-08-30 406 scoped_guard(device, dev) {
7f569e917b7866 Li Ming 2024-08-30 @407 if (dev->driver) {
19398821b25a9c Dan Williams 2023-01-20 408 cxl_nvd = to_cxl_nvdimm(dev);
19398821b25a9c Dan Williams 2023-01-20 409 if (cxl_nvd->cxlmd && cxl_nvd->cxlmd->cxl_nvb == data)
19398821b25a9c Dan Williams 2023-01-20 410 release = true;
7f569e917b7866 Li Ming 2024-08-30 411 }
7f569e917b7866 Li Ming 2024-08-30 412 }
19398821b25a9c Dan Williams 2023-01-20 413 if (release)
19398821b25a9c Dan Williams 2023-01-20 414 device_release_driver(dev);
5f761998c93e30 Dave Jiang 2026-02-11 415
5f761998c93e30 Dave Jiang 2026-02-11 416 cxlmd = cxl_nvd->cxlmd;
5f761998c93e30 Dave Jiang 2026-02-11 417 devm_release_action(&cxlmd->dev, cxlmd_release_nvdimm, cxlmd);
5f761998c93e30 Dave Jiang 2026-02-11 418
19398821b25a9c Dan Williams 2023-01-20 419 return 0;
19398821b25a9c Dan Williams 2023-01-20 420 }
19398821b25a9c Dan Williams 2023-01-20 421
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2026-02-12 6:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 23:26 [PATCH v2 0/3] cxl: Fix nvdimm_bus race for nvdimm devices Dave Jiang
2026-02-11 23:26 ` [PATCH v2 1/3] cxl: Move devm_cxl_add_nvdimm_bridge() to cxl_pmem.ko Dave Jiang
2026-02-11 23:46 ` dan.j.williams
2026-02-11 23:26 ` [PATCH v2 2/3] cxl: Fix race of nvdimm_bus object when creating nvdimm objects Dave Jiang
2026-02-11 23:55 ` dan.j.williams
2026-02-12 0:00 ` Dave Jiang
2026-02-11 23:26 ` [PATCH v2 3/3] cxl: Clean up cxl_nvdimm devices when removing nvdimm_bus Dave Jiang
2026-02-12 0:23 ` dan.j.williams
2026-02-12 6:01 ` kernel test robot [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=202602121343.8IGnsS7f-lkp@intel.com \
--to=lkp@intel.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=vishal.l.verma@intel.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