public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu/sysfs: constify the class struct
@ 2024-10-18 12:17 Bartosz Golaszewski
  2024-10-21 13:08 ` Jason Gunthorpe
  2024-10-29  8:50 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2024-10-18 12:17 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon, Robin Murphy
  Cc: iommu, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

All functions that take the class address as argument expect a const
pointer so we can make the iommu class constant.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/iommu/iommu-sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c
index cbe378c34ba3..170022c09536 100644
--- a/drivers/iommu/iommu-sysfs.c
+++ b/drivers/iommu/iommu-sysfs.c
@@ -34,7 +34,7 @@ static void release_device(struct device *dev)
 	kfree(dev);
 }
 
-static struct class iommu_class = {
+static const struct class iommu_class = {
 	.name = "iommu",
 	.dev_release = release_device,
 	.dev_groups = dev_groups,
-- 
2.43.0


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

* Re: [PATCH] iommu/sysfs: constify the class struct
  2024-10-18 12:17 [PATCH] iommu/sysfs: constify the class struct Bartosz Golaszewski
@ 2024-10-21 13:08 ` Jason Gunthorpe
  2024-10-29  8:50 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2024-10-21 13:08 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Joerg Roedel, Will Deacon, Robin Murphy, iommu, linux-kernel,
	Bartosz Golaszewski

On Fri, Oct 18, 2024 at 02:17:25PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> All functions that take the class address as argument expect a const
> pointer so we can make the iommu class constant.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>  drivers/iommu/iommu-sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

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

* Re: [PATCH] iommu/sysfs: constify the class struct
  2024-10-18 12:17 [PATCH] iommu/sysfs: constify the class struct Bartosz Golaszewski
  2024-10-21 13:08 ` Jason Gunthorpe
@ 2024-10-29  8:50 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2024-10-29  8:50 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Will Deacon, Robin Murphy, iommu, linux-kernel,
	Bartosz Golaszewski

On Fri, Oct 18, 2024 at 02:17:25PM +0200, Bartosz Golaszewski wrote:
>  drivers/iommu/iommu-sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

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

end of thread, other threads:[~2024-10-29  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 12:17 [PATCH] iommu/sysfs: constify the class struct Bartosz Golaszewski
2024-10-21 13:08 ` Jason Gunthorpe
2024-10-29  8:50 ` Joerg Roedel

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