iommu: remove iommu_dev_feature_enabled
authorChristoph Hellwig <hch@lst.de>
Fri, 8 Jul 2022 08:06:14 +0000 (10:06 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 15 Jul 2022 08:13:45 +0000 (10:13 +0200)
Remove the unused iommu_dev_feature_enabled function.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20220708080616.238833-3-hch@lst.de
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/iommu.c
include/linux/iommu.h

index 1b6c17dd81ee45c132f24dbb91270cde94e5617f..4d30a8d2bc2369fc8e4b3b5405a63c260ae53684 100644 (file)
@@ -2853,7 +2853,6 @@ static struct iommu_ops arm_smmu_ops = {
        .of_xlate               = arm_smmu_of_xlate,
        .get_resv_regions       = arm_smmu_get_resv_regions,
        .put_resv_regions       = generic_iommu_put_resv_regions,
-       .dev_feat_enabled       = arm_smmu_dev_feature_enabled,
        .dev_enable_feat        = arm_smmu_dev_enable_feature,
        .dev_disable_feat       = arm_smmu_dev_disable_feature,
        .sva_bind               = arm_smmu_sva_bind,
index 0aa141646bdf4c9dc9ac41c76991c684f75a4d87..1bb016a6a2aa1a4928ffd5ef1eb38d660e3cf9a9 100644 (file)
@@ -2760,19 +2760,6 @@ int iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features feat)
 }
 EXPORT_SYMBOL_GPL(iommu_dev_disable_feature);
 
-bool iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features feat)
-{
-       if (dev->iommu && dev->iommu->iommu_dev) {
-               const struct iommu_ops *ops = dev->iommu->iommu_dev->ops;
-
-               if (ops->dev_feat_enabled)
-                       return ops->dev_feat_enabled(dev, feat);
-       }
-
-       return false;
-}
-EXPORT_SYMBOL_GPL(iommu_dev_feature_enabled);
-
 /**
  * iommu_sva_bind_device() - Bind a process address space to a device
  * @dev: the device
index a3acdb46b939171ec8cdd34664c48bb1cbf76d18..0bc2eb14b0262241c939bcf97ccbc4a65b63adb3 100644 (file)
@@ -215,7 +215,6 @@ struct iommu_iotlb_gather {
  *                      driver init to device driver init (default no)
  * @dev_has/enable/disable_feat: per device entries to check/enable/disable
  *                               iommu specific features.
- * @dev_feat_enabled: check enabled feature
  * @sva_bind: Bind process address space to device
  * @sva_unbind: Unbind process address space from device
  * @sva_get_pasid: Get PASID associated to a SVA handle
@@ -247,7 +246,6 @@ struct iommu_ops {
        bool (*is_attach_deferred)(struct device *dev);
 
        /* Per device IOMMU features */
-       bool (*dev_feat_enabled)(struct device *dev, enum iommu_dev_features f);
        int (*dev_enable_feat)(struct device *dev, enum iommu_dev_features f);
        int (*dev_disable_feat)(struct device *dev, enum iommu_dev_features f);
 
@@ -670,7 +668,6 @@ void iommu_release_device(struct device *dev);
 
 int iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features f);
 int iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features f);
-bool iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features f);
 
 struct iommu_sva *iommu_sva_bind_device(struct device *dev,
                                        struct mm_struct *mm,
@@ -997,12 +994,6 @@ const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode)
        return NULL;
 }
 
-static inline bool
-iommu_dev_feature_enabled(struct device *dev, enum iommu_dev_features feat)
-{
-       return false;
-}
-
 static inline int
 iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features feat)
 {