From: kernel test robot <lkp@intel.com>
To: "Carlos López" <clopez@suse.de>, kvm@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, alex.williamson@redhat.com,
pbonzini@redhat.com, "Carlos López" <clopez@suse.de>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] KVM: VFIO: use mutex guard in kvm_vfio_file_set_spapr_tce()
Date: Tue, 7 Apr 2026 11:48:53 +0800 [thread overview]
Message-ID: <202604031640.vckbuS2S-lkp@intel.com> (raw)
In-Reply-To: <20260313122040.1413091-5-clopez@suse.de>
Hi Carlos,
kernel test robot noticed the following build warnings:
[auto build test WARNING on d2ea4ff1ce50787a98a3900b3fb1636f3620b7cf]
url: https://github.com/intel-lab-lkp/linux/commits/Carlos-L-pez/KVM-VFIO-clean-up-control-flow-in-kvm_vfio_file_add/20260314-053050
base: d2ea4ff1ce50787a98a3900b3fb1636f3620b7cf
patch link: https://lore.kernel.org/r/20260313122040.1413091-5-clopez%40suse.de
patch subject: [PATCH 2/4] KVM: VFIO: use mutex guard in kvm_vfio_file_set_spapr_tce()
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260403/202604031640.vckbuS2S-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260403/202604031640.vckbuS2S-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/202604031640.vckbuS2S-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/powerpc/kvm/../../../virt/kvm/vfio.c: In function 'kvm_vfio_file_set_spapr_tce':
>> arch/powerpc/kvm/../../../virt/kvm/vfio.c:219:13: warning: unused variable 'ret' [-Wunused-variable]
219 | int ret;
| ^~~
vim +/ret +219 arch/powerpc/kvm/../../../virt/kvm/vfio.c
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 211
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 212 #ifdef CONFIG_SPAPR_TCE_IOMMU
2f99073a722beef Yi Liu 2023-07-18 213 static int kvm_vfio_file_set_spapr_tce(struct kvm_device *dev,
73b0565f19a8fbc Jason Gunthorpe 2022-05-04 214 void __user *arg)
73b0565f19a8fbc Jason Gunthorpe 2022-05-04 215 {
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 216 struct kvm_vfio_spapr_tce param;
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 217 struct kvm_vfio *kv = dev->private;
2f99073a722beef Yi Liu 2023-07-18 218 struct kvm_vfio_file *kvf;
73b0565f19a8fbc Jason Gunthorpe 2022-05-04 @219 int ret;
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 220
73b0565f19a8fbc Jason Gunthorpe 2022-05-04 221 if (copy_from_user(¶m, arg, sizeof(struct kvm_vfio_spapr_tce)))
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 222 return -EFAULT;
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 223
8152f8201088350 Al Viro 2024-07-19 224 CLASS(fd, f)(param.groupfd);
8152f8201088350 Al Viro 2024-07-19 225 if (fd_empty(f))
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 226 return -EBADF;
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 227
db3d8c11676213b Carlos López 2026-03-13 228 guard(mutex)(&kv->lock);
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 229
2f99073a722beef Yi Liu 2023-07-18 230 list_for_each_entry(kvf, &kv->file_list, node) {
1da91ea87aefe2c Al Viro 2024-05-31 231 if (kvf->file != fd_file(f))
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 232 continue;
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 233
2f99073a722beef Yi Liu 2023-07-18 234 if (!kvf->iommu_group) {
2f99073a722beef Yi Liu 2023-07-18 235 kvf->iommu_group = kvm_vfio_file_iommu_group(kvf->file);
db3d8c11676213b Carlos López 2026-03-13 236 if (WARN_ON_ONCE(!kvf->iommu_group))
db3d8c11676213b Carlos López 2026-03-13 237 return -EIO;
819da99a7360f7e Jason Gunthorpe 2022-10-07 238 }
d55d9e7a4572182 Jason Gunthorpe 2022-05-04 239
db3d8c11676213b Carlos López 2026-03-13 240 return kvm_spapr_tce_attach_iommu_group(dev->kvm, param.tablefd,
2f99073a722beef Yi Liu 2023-07-18 241 kvf->iommu_group);
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 242 }
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 243
db3d8c11676213b Carlos López 2026-03-13 244 return -ENOENT;
121f80ba68f1a57 Alexey Kardashevskiy 2017-03-22 245 }
73b0565f19a8fbc Jason Gunthorpe 2022-05-04 246 #endif
73b0565f19a8fbc Jason Gunthorpe 2022-05-04 247
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-04-07 3:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 12:20 [PATCH 0/4] KVM: VFIO: use mutex guards to simplify control flow Carlos López
2026-03-13 12:20 ` [PATCH 1/4] KVM: VFIO: clean up control flow in kvm_vfio_file_add() Carlos López
2026-03-13 12:20 ` [PATCH 2/4] KVM: VFIO: use mutex guard in kvm_vfio_file_set_spapr_tce() Carlos López
2026-04-07 3:48 ` kernel test robot [this message]
2026-04-17 10:05 ` Carlos López
2026-04-17 13:31 ` Sean Christopherson
2026-03-13 12:20 ` [PATCH 3/4] KVM: VFIO: deduplicate file release logic Carlos López
2026-03-13 12:20 ` [PATCH 4/4] KVM: VFIO: update coherency only if file was deleted Carlos López
2026-03-18 20:31 ` [PATCH 0/4] KVM: VFIO: use mutex guards to simplify control flow Alex Williamson
2026-04-03 23:38 ` Sean Christopherson
2026-05-19 0:41 ` Sean Christopherson
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=202604031640.vckbuS2S-lkp@intel.com \
--to=lkp@intel.com \
--cc=alex.williamson@redhat.com \
--cc=clopez@suse.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.