public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [hare-scsi-devel:ns-migration 17/18] drivers/nvme/host/multipath.c:709:11: warning: variable 'old_instance' set but not used
@ 2025-04-03  3:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-04-03  3:46 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git ns-migration
head:   1cd2ac8db713fdf42bc7bb10329d795f7aee4f1f
commit: c99bbaa789ad558a900b867b376d68801acbbf9a [17/18] nvme: namespace migration
config: hexagon-randconfig-002-20250403 (https://download.01.org/0day-ci/archive/20250403/202504031140.v7ySR5D9-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 7eccafc3c84606587a175c0a8c1ebea6e4fb21cd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250403/202504031140.v7ySR5D9-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/202504031140.v7ySR5D9-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/nvme/host/multipath.c:709:11: warning: variable 'old_instance' set but not used [-Wunused-but-set-variable]
     709 |         int ret, old_instance;
         |                  ^
   1 warning generated.


vim +/old_instance +709 drivers/nvme/host/multipath.c

   705	
   706	int nvme_mpath_move_head(struct nvme_ns_head *head, struct nvme_subsystem *subsys)
   707	{
   708		struct nvme_subsystem *old_subsys = head->subsys;
 > 709		int ret, old_instance;
   710	
   711		ret = ida_alloc_min(&subsys->ns_ida, 1, GFP_KERNEL);
   712		if (ret < 0)
   713			return ret;
   714	
   715		mutex_lock(&old_subsys->lock);
   716		list_del_init(&head->entry);
   717		mutex_unlock(&old_subsys->lock);
   718		list_add_tail(&head->entry, &subsys->nsheads);
   719		head->subsys = subsys;
   720		old_instance = head->instance;
   721		head->instance = ret;
   722		ret = device_move(disk_to_dev(head->disk), &subsys->dev,
   723			    DPM_ORDER_DEV_AFTER_PARENT);
   724		if (ret) {
   725			mutex_lock(&old_subsys->lock);
   726			list_del_init(&head->entry);
   727			list_add_tail(&head->entry, &old_subsys->nsheads);
   728			head->subsys = old_subsys;
   729			mutex_unlock(&old_subsys->lock);
   730		} else {
   731			ida_free(&old_subsys->ns_ida, head->instance);
   732		}
   733		return ret;
   734	}
   735	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-04-03  3:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03  3:46 [hare-scsi-devel:ns-migration 17/18] drivers/nvme/host/multipath.c:709:11: warning: variable 'old_instance' set but not used kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox