[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220106022053.2406748-9-baolu.lu@linux.intel.com>
Date: Thu, 6 Jan 2022 10:20:53 +0800
From: Lu Baolu <baolu.lu@...ux.intel.com>
To: Joerg Roedel <joro@...tes.org>,
Alex Williamson <alex.williamson@...hat.com>,
Robin Murphy <robin.murphy@....com>,
Jason Gunthorpe <jgg@...dia.com>,
Christoph Hellwig <hch@...radead.org>,
Kevin Tian <kevin.tian@...el.com>,
Ashok Raj <ashok.raj@...el.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Will Deacon <will@...nel.org>,
Dan Williams <dan.j.williams@...el.com>, rafael@...nel.org,
Diana Craciun <diana.craciun@....nxp.com>,
Cornelia Huck <cohuck@...hat.com>,
Eric Auger <eric.auger@...hat.com>,
Liu Yi L <yi.l.liu@...el.com>,
Jacob jun Pan <jacob.jun.pan@...el.com>,
Chaitanya Kulkarni <kch@...dia.com>,
Stuart Yoder <stuyoder@...il.com>,
Laurentiu Tudor <laurentiu.tudor@....com>,
Thierry Reding <thierry.reding@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Jonathan Hunter <jonathanh@...dia.com>,
Li Yang <leoyang.li@....com>,
Dmitry Osipenko <digetx@...il.com>,
iommu@...ts.linux-foundation.org, linux-pci@...r.kernel.org,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Lu Baolu <baolu.lu@...ux.intel.com>
Subject: [PATCH v1 8/8] iommu: Remove iommu_attach/detach_group()
The iommu_attach/detach_group() interfaces have no reference in the tree
anymore. Remove them to avoid dead code.
Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com>
---
include/linux/iommu.h | 15 ---------------
drivers/iommu/iommu.c | 20 --------------------
2 files changed, 35 deletions(-)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 66ebce3d1e11..2568ab0d0872 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -457,10 +457,6 @@ iommu_alloc_resv_region(phys_addr_t start, size_t length, int prot,
extern int iommu_get_group_resv_regions(struct iommu_group *group,
struct list_head *head);
-extern int iommu_attach_group(struct iommu_domain *domain,
- struct iommu_group *group);
-extern void iommu_detach_group(struct iommu_domain *domain,
- struct iommu_group *group);
extern struct iommu_group *iommu_group_alloc(void);
extern void *iommu_group_get_iommudata(struct iommu_group *group);
extern void iommu_group_set_iommudata(struct iommu_group *group,
@@ -818,17 +814,6 @@ static inline bool iommu_default_passthrough(void)
return true;
}
-static inline int iommu_attach_group(struct iommu_domain *domain,
- struct iommu_group *group)
-{
- return -ENODEV;
-}
-
-static inline void iommu_detach_group(struct iommu_domain *domain,
- struct iommu_group *group)
-{
-}
-
static inline struct iommu_group *iommu_group_alloc(void)
{
return ERR_PTR(-ENODEV);
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 2c9efd85e447..33f7027e677f 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -2308,18 +2308,6 @@ static int __iommu_attach_group(struct iommu_domain *domain,
return ret;
}
-int iommu_attach_group(struct iommu_domain *domain, struct iommu_group *group)
-{
- int ret;
-
- mutex_lock(&group->mutex);
- ret = __iommu_attach_group(domain, group);
- mutex_unlock(&group->mutex);
-
- return ret;
-}
-EXPORT_SYMBOL_GPL(iommu_attach_group);
-
static int iommu_group_do_detach_device(struct device *dev, void *data)
{
struct iommu_domain *domain = data;
@@ -2357,14 +2345,6 @@ static void __iommu_detach_group(struct iommu_domain *domain,
group->domain = group->default_domain;
}
-void iommu_detach_group(struct iommu_domain *domain, struct iommu_group *group)
-{
- mutex_lock(&group->mutex);
- __iommu_detach_group(domain, group);
- mutex_unlock(&group->mutex);
-}
-EXPORT_SYMBOL_GPL(iommu_detach_group);
-
phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova)
{
if (domain->type == IOMMU_DOMAIN_IDENTITY)
--
2.25.1
Powered by blists - more mailing lists