[linux-nvme:nvme-6.15 3/4] drivers/nvme/host/core.c:4302:5: warning: 'CONFIG_NVME_MULTIPATH' is not defined, evaluates to 0
kernel test robot
lkp at intel.com
Mon Apr 7 10:33:16 PDT 2025
tree: git://git.infradead.org/nvme.git nvme-6.15
head: 9e270930d683ff0207fed7f303988a7ad63ddfcb
commit: a98aa32696a1a19814a2f97853400b28622c6a8f [3/4] nvme: re-read ANA log page after ns scan completes
config: riscv-randconfig-002-20250408 (https://download.01.org/0day-ci/archive/20250408/202504080139.KuphZ8ZZ-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 92c93f5286b9ff33f27ff694d2dc33da1c07afdd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250408/202504080139.KuphZ8ZZ-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504080139.KuphZ8ZZ-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/nvme/host/core.c:4302:5: warning: 'CONFIG_NVME_MULTIPATH' is not defined, evaluates to 0 [-Wundef]
4302 | #if CONFIG_NVME_MULTIPATH
| ^
1 warning generated.
vim +/CONFIG_NVME_MULTIPATH +4302 drivers/nvme/host/core.c
4254
4255 static void nvme_scan_work(struct work_struct *work)
4256 {
4257 struct nvme_ctrl *ctrl =
4258 container_of(work, struct nvme_ctrl, scan_work);
4259 int ret;
4260
4261 /* No tagset on a live ctrl means IO queues could not created */
4262 if (nvme_ctrl_state(ctrl) != NVME_CTRL_LIVE || !ctrl->tagset)
4263 return;
4264
4265 /*
4266 * Identify controller limits can change at controller reset due to
4267 * new firmware download, even though it is not common we cannot ignore
4268 * such scenario. Controller's non-mdts limits are reported in the unit
4269 * of logical blocks that is dependent on the format of attached
4270 * namespace. Hence re-read the limits at the time of ns allocation.
4271 */
4272 ret = nvme_init_non_mdts_limits(ctrl);
4273 if (ret < 0) {
4274 dev_warn(ctrl->device,
4275 "reading non-mdts-limits failed: %d\n", ret);
4276 return;
4277 }
4278
4279 if (test_and_clear_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events)) {
4280 dev_info(ctrl->device, "rescanning namespaces.\n");
4281 nvme_clear_changed_ns_log(ctrl);
4282 }
4283
4284 mutex_lock(&ctrl->scan_lock);
4285 if (!nvme_id_cns_ok(ctrl, NVME_ID_CNS_NS_ACTIVE_LIST)) {
4286 nvme_scan_ns_sequential(ctrl);
4287 } else {
4288 /*
4289 * Fall back to sequential scan if DNR is set to handle broken
4290 * devices which should support Identify NS List (as per the VS
4291 * they report) but don't actually support it.
4292 */
4293 ret = nvme_scan_ns_list(ctrl);
4294 if (ret > 0 && ret & NVME_STATUS_DNR)
4295 nvme_scan_ns_sequential(ctrl);
4296 }
4297 mutex_unlock(&ctrl->scan_lock);
4298
4299 /* Requeue if we have missed AENs */
4300 if (test_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events))
4301 nvme_queue_scan(ctrl);
> 4302 #if CONFIG_NVME_MULTIPATH
4303 else
4304 /* Re-read the ANA log page to not miss updates */
4305 queue_work(nvme_wq, &ctrl->ana_work);
4306 #endif
4307 }
4308
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linux-nvme
mailing list