From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [hch-misc:i915-mdev 37/40] virt/kvm/vfio.c:63:19: error: redefinition of 'kv'
Date: Sun, 25 Jul 2021 11:44:50 +0800 [thread overview]
Message-ID: <202107251143.wgx1ES6W-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3368 bytes --]
tree: git://git.infradead.org/users/hch/misc.git i915-mdev
head: 3e7e1da34feaeb5473f397c9cab73b4eb7f6a33c
commit: 4e07f42532ddb1837a7eeb3e1ed6dc18fa673220 [37/40] kvm/vfio: refactor kvm_vfio_set_group
config: powerpc64-randconfig-p001-20210725 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc i915-mdev
git checkout 4e07f42532ddb1837a7eeb3e1ed6dc18fa673220
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
virt/kvm/vfio.c: In function 'kvm_vfio_set_spapr_tce':
>> virt/kvm/vfio.c:63:19: error: redefinition of 'kv'
63 | struct kvm_vfio *kv = dev->private;
| ^~
virt/kvm/vfio.c:60:19: note: previous definition of 'kv' was here
60 | struct kvm_vfio *kv = dev->private;
| ^~
>> virt/kvm/vfio.c:65:25: error: redeclaration of 'kvg' with no linkage
65 | struct kvm_vfio_group *kvg;
| ^~~
virt/kvm/vfio.c:61:25: note: previous declaration of 'kvg' was here
61 | struct kvm_vfio_group *kvg;
| ^~~
vim +/kv +63 virt/kvm/vfio.c
57
58 static int kvm_vfio_set_spapr_tce(struct kvm_device *dev, void __user *argp)
59 {
60 struct kvm_vfio *kv = dev->private;
61 struct kvm_vfio_group *kvg;
62 struct kvm_vfio_spapr_tce param;
> 63 struct kvm_vfio *kv = dev->private;
64 struct vfio_group *vfio_group;
> 65 struct kvm_vfio_group *kvg;
66 struct iommu_group *grp;
67 struct fd f;
68 int ret;
69
70 if (copy_from_user(¶m, argp, sizeof(struct kvm_vfio_spapr_tce)))
71 return -EFAULT;
72
73 f = fdget(param.groupfd);
74 if (!f.file)
75 return -EBADF;
76 vfio_group = vfio_group_get_external_user(f.file);
77 fdput(f);
78
79 if (IS_ERR(vfio_group))
80 return PTR_ERR(vfio_group);
81
82 ret = -EIO;
83 grp = kvm_vfio_group_get_iommu_group(vfio_group);
84 if (WARN_ON_ONCE(!grp))
85 goto out;
86
87 ret = -ENOENT;
88 mutex_lock(&kv->lock);
89 list_for_each_entry(kvg, &kv->group_list, node) {
90 if (kvg->vfio_group != vfio_group)
91 continue;
92 ret = kvm_spapr_tce_attach_iommu_group(dev->kvm, param.tablefd,
93 grp);
94 break;
95 }
96 mutex_unlock(&kv->lock);
97
98 iommu_group_put(grp);
99 out:
100 vfio_group_put_external_user(vfio_group);
101 return ret;
102 }
103 #else
104 static inline void kvm_spapr_tce_release_vfio_group(struct kvm *kvm,
105 struct vfio_group *vfio_group)
106 {
107 }
108 #endif /* CONFIG_SPAPR_TCE_IOMMU */
109
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33621 bytes --]
reply other threads:[~2021-07-25 3:45 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=202107251143.wgx1ES6W-lkp@intel.com \
--to=lkp@intel.com \
--cc=hch@lst.de \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).