From: kernel test robot <lkp@intel.com>
To: Hannes Reinecke <hare@suse.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [hare-scsi-devel:ns-migration 17/18] drivers/nvme/host/multipath.c:709:11: warning: variable 'old_instance' set but not used
Date: Thu, 3 Apr 2025 11:46:47 +0800 [thread overview]
Message-ID: <202504031140.v7ySR5D9-lkp@intel.com> (raw)
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
reply other threads:[~2025-04-03 3:47 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=202504031140.v7ySR5D9-lkp@intel.com \
--to=lkp@intel.com \
--cc=hare@suse.de \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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