Skip to content

Commit

Permalink
iommu: Make iommu_release_device() static
Browse files Browse the repository at this point in the history
This is not called outside the core code, and indeed cannot be called
correctly outside the bus notifier. Make it static.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/0-v1-c3da18124d2d+56-rm_iommu_release_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Jason Gunthorpe authored and Joerg Roedel committed Apr 14, 2023
1 parent 99b5726 commit e223864
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ static const char * const iommu_group_resv_type_string[] = {

static int iommu_bus_notifier(struct notifier_block *nb,
unsigned long action, void *data);
static void iommu_release_device(struct device *dev);
static int iommu_alloc_default_domain(struct iommu_group *group,
struct device *dev);
static struct iommu_domain *__iommu_domain_alloc(struct bus_type *bus,
Expand Down Expand Up @@ -493,7 +494,7 @@ static void __iommu_group_release_device(struct iommu_group *group,
kobject_put(group->devices_kobj);
}

void iommu_release_device(struct device *dev)
static void iommu_release_device(struct device *dev)
{
struct iommu_group *group = dev->iommu_group;
struct group_device *device;
Expand Down
1 change: 0 additions & 1 deletion include/linux/iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,6 @@ static inline void dev_iommu_priv_set(struct device *dev, void *priv)
}

int iommu_probe_device(struct device *dev);
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);
Expand Down

0 comments on commit e223864

Please sign in to comment.