Skip to contentSkip to conversation

iommu: Fix IOMMU sysfs stubs

PATCH Applied Alex Williamson 2 participants 2 messages Jul 7, 2014 – Jul 8, 2014 1 message not in the archive IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu: Fix IOMMU sysfs stubs

0-day kernel build testing reports:

arch/x86/kvm/x86.o: In function `iommu_device_destroy':

Quoted 1 line
Quoted 1 line

(.text+0x7a0a): multiple definition of `iommu_device_destroy'

arch/x86/kvm/../../../virt/kvm/vfio.o:vfio.c:(.text+0x490): first defined here arch/x86/kvm/x86.o: In function `iommu_device_link':

Quoted 1 line
Quoted 1 line

(.text+0x7a15): multiple definition of `iommu_device_link'

arch/x86/kvm/../../../virt/kvm/vfio.o:vfio.c:(.text+0x49b): first defined here arch/x86/kvm/x86.o: In function `iommu_device_unlink':

Quoted 1 line
Quoted 1 line

(.text+0x7a25): multiple definition of `iommu_device_unlink'

arch/x86/kvm/../../../virt/kvm/vfio.o:vfio.c:(.text+0x4ab): first defined here arch/x86/kvm/x86.o: In function `iommu_device_create':

Quoted 1 line
Quoted 1 line

(.text+0x79f8): multiple definition of `iommu_device_create'

arch/x86/kvm/../../../virt/kvm/vfio.o:vfio.c:(.text+0x47e): first defined here

These are due to failing to define the stubs as static inline. Fix.

---

relative to joro/iommu.git core

 include/linux/iommu.h |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
include/linux/iommu.h +7 -6
index c7097d7..20f9a52 100644
@@ -403,23 +403,24 @@ static inline int iommu_domain_set_attr(struct iommu_domain *domain,
 	return -EINVAL;
 }
 
-struct device *iommu_device_create(struct device *parent, void *drvdata,
-				   const struct attribute_group **groups,
-				   const char *fmt, ...)
+static inline struct device *iommu_device_create(struct device *parent,
+					void *drvdata,
+					const struct attribute_group **groups,
+					const char *fmt, ...)
 {
 	return ERR_PTR(-ENODEV);
 }
 
-void iommu_device_destroy(struct device *dev)
+static inline void iommu_device_destroy(struct device *dev)
 {
 }
 
-int iommu_device_link(struct device *dev, struct device *link)
+static inline int iommu_device_link(struct device *dev, struct device *link)
 {
 	return -EINVAL;
 }
 
-void iommu_device_unlink(struct device *dev, struct device *link)
+static inline void iommu_device_unlink(struct device *dev, struct device *link)
 {
 }
 

A message that is not in the archive (sent off-list or not yet received): 20140707203054.28174.58508.stgit-GCcqpEzw8uZBDLzU/[email protected]

Applied
#2 lore raw
Quoted 10 lines · Alex Williamson

0-day kernel build testing reports:

   arch/x86/kvm/x86.o: In function `iommu_device_destroy':
Quoted 1 line
Quoted 1 line

(.text+0x7a0a): multiple definition of `iommu_device_destroy'

arch/x86/kvm/../../../virt/kvm/vfio.o:vfio.c:(.text+0x490): first defined here arch/x86/kvm/x86.o: In function `iommu_device_link':

Quoted 1 line
Quoted 1 line

(.text+0x7a15): multiple definition of `iommu_device_link'

arch/x86/kvm/../../../virt/kvm/vfio.o:vfio.c:(.text+0x49b): first defined here arch/x86/kvm/x86.o: In function `iommu_device_unlink':

Quoted 1 line
Quoted 1 line

(.text+0x7a25): multiple definition of `iommu_device_unlink'

Quoted 8 lines

arch/x86/kvm/../../../virt/kvm/vfio.o:vfio.c:(.text+0x4ab): first defined here arch/x86/kvm/x86.o: In function `iommu_device_create':

Quoted 1 line
Quoted 1 line

(.text+0x79f8): multiple definition of `iommu_device_create'

arch/x86/kvm/../../../virt/kvm/vfio.o:vfio.c:(.text+0x47e): first defined here

These are due to failing to define the stubs as static inline. Fix.

Applied, thanks.