Re: [PATCH 04/10] iommu: Add sysfs bindings for struct iommu_device

kbuild test robot
2017-02-03T19:54:00Z

[-- Attachment #1: Type: text/plain, Size: 2921 bytes --]

Hi Joerg,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc6]
[cannot apply to iommu/next next-20170203]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Joerg-Roedel/Let-IOMMU-core-know-about-individual-IOMMUs/20170203-232949
config: x86_64-randconfig-h0-02040037 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

In file included from drivers/iommu/dmar.c:34:0:
include/linux/intel-iommu.h:443:22: error: field 'iommu' has incomplete type
struct iommu_device iommu; /* IOMMU core code handle */
^
drivers/iommu/dmar.c: In function 'alloc_iommu':
>> drivers/iommu/dmar.c:1083:3: error: implicit declaration of function 'iommu_device_sysfs_add' [-Werror=implicit-function-declaration]
err = iommu_device_sysfs_add(&iommu->iommu, NULL,
^
drivers/iommu/dmar.c:1091:3: error: implicit declaration of function 'iommu_device_register' [-Werror=implicit-function-declaration]
err = iommu_device_register(&iommu->iommu);
^
drivers/iommu/dmar.c: In function 'free_iommu':
>> drivers/iommu/dmar.c:1111:2: error: implicit declaration of function 'iommu_device_sysfs_remove' [-Werror=implicit-function-declaration]
iommu_device_sysfs_remove(&iommu->iommu);
^
drivers/iommu/dmar.c:1112:2: error: implicit declaration of function 'iommu_device_unregister' [-Werror=implicit-function-declaration]
iommu_device_unregister(&iommu->iommu);
^
cc1: some warnings being treated as errors

vim +/iommu_device_sysfs_add +1083 drivers/iommu/dmar.c

1077 if (sts & DMA_GSTS_QIES)
1078 iommu->gcmd |= DMA_GCMD_QIE;
1079
1080 raw_spin_lock_init(&iommu->register_lock);
1081
1082 if (intel_iommu_enabled) {
> 1083 err = iommu_device_sysfs_add(&iommu->iommu, NULL,
1084 intel_iommu_groups,
1085 "%s", iommu->name);
1086 if (err)
1087 goto err_unmap;
1088
1089 iommu->iommu.ops = &intel_iommu_ops;
1090
1091 err = iommu_device_register(&iommu->iommu);
1092 if (err)
1093 goto err_unmap;
1094 }
1095
1096 drhd->iommu = iommu;
1097
1098 return 0;
1099
1100 err_unmap:
1101 unmap_iommu(iommu);
1102 error_free_seq_id:
1103 dmar_free_seq_id(iommu);
1104 error:
1105 kfree(iommu);
1106 return err;
1107 }
1108
1109 static void free_iommu(struct intel_iommu *iommu)
1110 {
> 1111 iommu_device_sysfs_remove(&iommu->iommu);
1112 iommu_device_unregister(&iommu->iommu);
1113
1114 if (iommu->irq) {

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25541 bytes --]