* [yiliu1765-iommufd:wip/iommufd_nesting_09072023-yi 57/63] drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3000:29: error: redefinition of 'arm_smmu_domain_alloc'
@ 2023-09-07 19:44 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-07 19:44 UTC (permalink / raw)
To: Yi Liu, Kevin Tian; +Cc: oe-kbuild-all
tree: https://github.com/yiliu1765/iommufd.git wip/iommufd_nesting_09072023-yi
head: 460a16348f1eeb401a169d0ad1815f8ac4d8c3b2
commit: 8edfc9bba9237d52efb488511659a6a534d4d0e6 [57/63] iommu/arm-smmu-v3: Add arm_smmu_domain_alloc_user
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20230908/202309080335.O2wbGI0Z-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230908/202309080335.O2wbGI0Z-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/202309080335.O2wbGI0Z-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3000:29: error: redefinition of 'arm_smmu_domain_alloc'
3000 | static struct iommu_domain *arm_smmu_domain_alloc(unsigned type)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2069:29: note: previous definition of 'arm_smmu_domain_alloc' with type 'struct iommu_domain *(unsigned int)'
2069 | static struct iommu_domain *arm_smmu_domain_alloc(unsigned type)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3036:35: error: initialization of 'struct iommu_domain * (*)(struct device *, enum iommu_hwpt_type, u32, struct iommu_domain *, const struct iommu_user_data *)' {aka 'struct iommu_domain * (*)(struct device *, enum iommu_hwpt_type, unsigned int, struct iommu_domain *, const struct iommu_user_data *)'} from incompatible pointer type 'struct iommu_domain * (*)(struct device *, enum iommu_hwpt_type, struct iommu_domain *, const struct iommu_user_data *)' [-Werror=incompatible-pointer-types]
3036 | .domain_alloc_user = arm_smmu_domain_alloc_user,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3036:35: note: (near initialization for 'arm_smmu_ops.domain_alloc_user')
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2069:29: warning: 'arm_smmu_domain_alloc' defined but not used [-Wunused-function]
2069 | static struct iommu_domain *arm_smmu_domain_alloc(unsigned type)
| ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/arm_smmu_domain_alloc +3000 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
2999
> 3000 static struct iommu_domain *arm_smmu_domain_alloc(unsigned type)
3001 {
3002 return __arm_smmu_domain_alloc(type, NULL, NULL);
3003 }
3004
3005 static struct iommu_domain *
3006 arm_smmu_domain_alloc_user(struct device *dev, enum iommu_hwpt_type hwpt_type,
3007 struct iommu_domain *parent,
3008 const struct iommu_user_data *user_data)
3009 {
3010 const size_t min_len = offsetofend(struct iommu_hwpt_arm_smmuv3, out_event_uptr);
3011 struct arm_smmu_master *master = dev_iommu_priv_get(dev);
3012 struct iommu_hwpt_arm_smmuv3 data, *user_cfg = NULL;
3013 unsigned type = IOMMU_DOMAIN_UNMANAGED;
3014
3015 if (hwpt_type != IOMMU_HWPT_TYPE_DEFAULT &&
3016 hwpt_type != IOMMU_HWPT_TYPE_ARM_SMMUV3)
3017 return ERR_PTR(-EINVAL);
3018 if (hwpt_type == IOMMU_HWPT_TYPE_DEFAULT && user_data)
3019 return ERR_PTR(-EINVAL);
3020
3021 if (user_data) {
3022 int ret = iommu_copy_user_data(&data, user_data,
3023 sizeof(data), min_len);
3024 if (ret)
3025 return ERR_PTR(ret);
3026 user_cfg = &data;
3027 }
3028
3029 return __arm_smmu_domain_alloc(type, master, user_cfg);
3030 }
3031
3032 static struct iommu_ops arm_smmu_ops = {
3033 .capable = arm_smmu_capable,
3034 .hw_info = arm_smmu_hw_info,
3035 .domain_alloc = arm_smmu_domain_alloc,
> 3036 .domain_alloc_user = arm_smmu_domain_alloc_user,
3037 .probe_device = arm_smmu_probe_device,
3038 .release_device = arm_smmu_release_device,
3039 .set_dev_user_data = arm_smmu_set_dev_user_data,
3040 .unset_dev_user_data = arm_smmu_unset_dev_user_data,
3041 .device_group = arm_smmu_device_group,
3042 .of_xlate = arm_smmu_of_xlate,
3043 .get_resv_regions = arm_smmu_get_resv_regions,
3044 .remove_dev_pasid = arm_smmu_remove_dev_pasid,
3045 .dev_enable_feat = arm_smmu_dev_enable_feature,
3046 .dev_disable_feat = arm_smmu_dev_disable_feature,
3047 .page_response = arm_smmu_page_response,
3048 .def_domain_type = arm_smmu_def_domain_type,
3049 .pgsize_bitmap = -1UL, /* Restricted during device attach */
3050 .owner = THIS_MODULE,
3051 .default_domain_ops = &(const struct iommu_domain_ops) {
3052 .attach_dev = arm_smmu_attach_dev,
3053 .map_pages = arm_smmu_map_pages,
3054 .unmap_pages = arm_smmu_unmap_pages,
3055 .flush_iotlb_all = arm_smmu_flush_iotlb_all,
3056 .iotlb_sync = arm_smmu_iotlb_sync,
3057 .iova_to_phys = arm_smmu_iova_to_phys,
3058 .free = arm_smmu_domain_free,
3059 }
3060 };
3061
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-07 19:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-07 19:44 [yiliu1765-iommufd:wip/iommufd_nesting_09072023-yi 57/63] drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3000:29: error: redefinition of 'arm_smmu_domain_alloc' kernel test robot
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.