From: kernel test robot <lkp@intel.com>
To: Yi Liu <yi.l.liu@intel.com>, Kevin Tian <kevin.tian@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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'
Date: Fri, 8 Sep 2023 03:44:39 +0800 [thread overview]
Message-ID: <202309080335.O2wbGI0Z-lkp@intel.com> (raw)
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
reply other threads:[~2023-09-07 19: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=202309080335.O2wbGI0Z-lkp@intel.com \
--to=lkp@intel.com \
--cc=kevin.tian@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yi.l.liu@intel.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.