Linux IOMMU Development
 help / color / mirror / Atom feed
* [PATCH] iommu: Make iommu_release_device() static
@ 2023-04-12 14:10 Jason Gunthorpe
  2023-04-12 14:19 ` Robin Murphy
  2023-04-14 11:08 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2023-04-12 14:10 UTC (permalink / raw)
  To: iommu, Joerg Roedel, Robin Murphy, Will Deacon

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>
---
 drivers/iommu/iommu.c | 3 ++-
 include/linux/iommu.h | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 7abee83610b6c9..435fc902df1984 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -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,
@@ -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;
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 54f535ff9868af..c892e06f8357ee 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -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);

base-commit: 43a31380ed6e16ad08675de5e68b5e4d05cf8716
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iommu: Make iommu_release_device() static
  2023-04-12 14:10 [PATCH] iommu: Make iommu_release_device() static Jason Gunthorpe
@ 2023-04-12 14:19 ` Robin Murphy
  2023-04-14 11:08 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Robin Murphy @ 2023-04-12 14:19 UTC (permalink / raw)
  To: Jason Gunthorpe, iommu, Joerg Roedel, Will Deacon

On 2023-04-12 15:10, Jason Gunthorpe wrote:
> This is not called outside the core code, and indeed cannot be called
> correctly outside the bus notifier. Make it static.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>

> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
>   drivers/iommu/iommu.c | 3 ++-
>   include/linux/iommu.h | 1 -
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 7abee83610b6c9..435fc902df1984 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -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,
> @@ -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;
> diff --git a/include/linux/iommu.h b/include/linux/iommu.h
> index 54f535ff9868af..c892e06f8357ee 100644
> --- a/include/linux/iommu.h
> +++ b/include/linux/iommu.h
> @@ -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);
> 
> base-commit: 43a31380ed6e16ad08675de5e68b5e4d05cf8716

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iommu: Make iommu_release_device() static
  2023-04-12 14:10 [PATCH] iommu: Make iommu_release_device() static Jason Gunthorpe
  2023-04-12 14:19 ` Robin Murphy
@ 2023-04-14 11:08 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2023-04-14 11:08 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: iommu, Robin Murphy, Will Deacon

On Wed, Apr 12, 2023 at 11:10:45AM -0300, Jason Gunthorpe wrote:
> 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>
> ---
>  drivers/iommu/iommu.c | 3 ++-
>  include/linux/iommu.h | 1 -
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-14 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-12 14:10 [PATCH] iommu: Make iommu_release_device() static Jason Gunthorpe
2023-04-12 14:19 ` Robin Murphy
2023-04-14 11:08 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox