All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] iommu: mtk: constify iommu_ops
@ 2017-08-28 12:12 ` Arvind Yadav
  0 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-28 12:12 UTC (permalink / raw)
  To: m.szyprowski, joro, kgene, krzk, matthias.bgg, gerald.schaefer
  Cc: linux-kernel, iommu, linux-arm-kernel, linux-mediatek

iommu_ops are not supposed to change at runtime.
Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with
const iommu_ops provided by <linux/iommu.h>. So mark the non-const
structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/iommu/mtk_iommu.c    | 4 ++--
 drivers/iommu/mtk_iommu_v1.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 91c6d36..eac99a3 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -102,7 +102,7 @@ struct mtk_iommu_domain {
 	struct iommu_domain		domain;
 };
 
-static struct iommu_ops mtk_iommu_ops;
+static const struct iommu_ops mtk_iommu_ops;
 
 static struct mtk_iommu_domain *to_mtk_domain(struct iommu_domain *dom)
 {
@@ -437,7 +437,7 @@ static int mtk_iommu_of_xlate(struct device *dev, struct of_phandle_args *args)
 	return iommu_fwspec_add_ids(dev, args->args, 1);
 }
 
-static struct iommu_ops mtk_iommu_ops = {
+static const struct iommu_ops mtk_iommu_ops = {
 	.domain_alloc	= mtk_iommu_domain_alloc,
 	.domain_free	= mtk_iommu_domain_free,
 	.attach_dev	= mtk_iommu_attach_device,
diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index bc1efbf..40b231f 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -363,7 +363,7 @@ static phys_addr_t mtk_iommu_iova_to_phys(struct iommu_domain *domain,
 	return pa;
 }
 
-static struct iommu_ops mtk_iommu_ops;
+static const struct iommu_ops mtk_iommu_ops;
 
 /*
  * MTK generation one iommu HW only support one iommu domain, and all the client
@@ -536,7 +536,7 @@ static int mtk_iommu_hw_init(const struct mtk_iommu_data *data)
 	return 0;
 }
 
-static struct iommu_ops mtk_iommu_ops = {
+static const struct iommu_ops mtk_iommu_ops = {
 	.domain_alloc	= mtk_iommu_domain_alloc,
 	.domain_free	= mtk_iommu_domain_free,
 	.attach_dev	= mtk_iommu_attach_device,
-- 
1.9.1

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

* [PATCH 2/3] iommu: mtk: constify iommu_ops
@ 2017-08-28 12:12 ` Arvind Yadav
  0 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-28 12:12 UTC (permalink / raw)
  To: linux-arm-kernel

iommu_ops are not supposed to change at runtime.
Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with
const iommu_ops provided by <linux/iommu.h>. So mark the non-const
structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/iommu/mtk_iommu.c    | 4 ++--
 drivers/iommu/mtk_iommu_v1.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 91c6d36..eac99a3 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -102,7 +102,7 @@ struct mtk_iommu_domain {
 	struct iommu_domain		domain;
 };
 
-static struct iommu_ops mtk_iommu_ops;
+static const struct iommu_ops mtk_iommu_ops;
 
 static struct mtk_iommu_domain *to_mtk_domain(struct iommu_domain *dom)
 {
@@ -437,7 +437,7 @@ static int mtk_iommu_of_xlate(struct device *dev, struct of_phandle_args *args)
 	return iommu_fwspec_add_ids(dev, args->args, 1);
 }
 
-static struct iommu_ops mtk_iommu_ops = {
+static const struct iommu_ops mtk_iommu_ops = {
 	.domain_alloc	= mtk_iommu_domain_alloc,
 	.domain_free	= mtk_iommu_domain_free,
 	.attach_dev	= mtk_iommu_attach_device,
diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index bc1efbf..40b231f 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -363,7 +363,7 @@ static phys_addr_t mtk_iommu_iova_to_phys(struct iommu_domain *domain,
 	return pa;
 }
 
-static struct iommu_ops mtk_iommu_ops;
+static const struct iommu_ops mtk_iommu_ops;
 
 /*
  * MTK generation one iommu HW only support one iommu domain, and all the client
@@ -536,7 +536,7 @@ static int mtk_iommu_hw_init(const struct mtk_iommu_data *data)
 	return 0;
 }
 
-static struct iommu_ops mtk_iommu_ops = {
+static const struct iommu_ops mtk_iommu_ops = {
 	.domain_alloc	= mtk_iommu_domain_alloc,
 	.domain_free	= mtk_iommu_domain_free,
 	.attach_dev	= mtk_iommu_attach_device,
-- 
1.9.1

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

* Re: [PATCH 2/3] iommu: mtk: constify iommu_ops
@ 2017-08-30 13:18   ` Joerg Roedel
  0 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2017-08-30 13:18 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: m.szyprowski, kgene, krzk, matthias.bgg, gerald.schaefer,
	linux-kernel, iommu, linux-arm-kernel, linux-mediatek

On Mon, Aug 28, 2017 at 05:42:26PM +0530, Arvind Yadav wrote:
> iommu_ops are not supposed to change at runtime.
> Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with
> const iommu_ops provided by <linux/iommu.h>. So mark the non-const
> structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  drivers/iommu/mtk_iommu.c    | 4 ++--
>  drivers/iommu/mtk_iommu_v1.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

This doesn't apply cleanly to the arm/mediatek branch in the iommu-tree.
Please rebase it against that branch and update the subject to:

	iommu/mediatek: Constify iommu_ops

to match the convention used in the iommu-tree and send it again.


Thanks,

	Joerg

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

* Re: [PATCH 2/3] iommu: mtk: constify iommu_ops
@ 2017-08-30 13:18   ` Joerg Roedel
  0 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2017-08-30 13:18 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, krzk-DgEjT+Ai2ygdnm+yROfE0A,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	kgene-DgEjT+Ai2ygdnm+yROfE0A,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w,
	gerald.schaefer-tA70FqPdS9bQT0dZR+AlfA

On Mon, Aug 28, 2017 at 05:42:26PM +0530, Arvind Yadav wrote:
> iommu_ops are not supposed to change at runtime.
> Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with
> const iommu_ops provided by <linux/iommu.h>. So mark the non-const
> structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/iommu/mtk_iommu.c    | 4 ++--
>  drivers/iommu/mtk_iommu_v1.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

This doesn't apply cleanly to the arm/mediatek branch in the iommu-tree.
Please rebase it against that branch and update the subject to:

	iommu/mediatek: Constify iommu_ops

to match the convention used in the iommu-tree and send it again.


Thanks,

	Joerg

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

* [PATCH 2/3] iommu: mtk: constify iommu_ops
@ 2017-08-30 13:18   ` Joerg Roedel
  0 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2017-08-30 13:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 28, 2017 at 05:42:26PM +0530, Arvind Yadav wrote:
> iommu_ops are not supposed to change at runtime.
> Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with
> const iommu_ops provided by <linux/iommu.h>. So mark the non-const
> structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  drivers/iommu/mtk_iommu.c    | 4 ++--
>  drivers/iommu/mtk_iommu_v1.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

This doesn't apply cleanly to the arm/mediatek branch in the iommu-tree.
Please rebase it against that branch and update the subject to:

	iommu/mediatek: Constify iommu_ops

to match the convention used in the iommu-tree and send it again.


Thanks,

	Joerg

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

* RE: [PATCH 2/3] iommu: mtk: constify iommu_ops
       [not found]   ` <d7decc0805d04c148bb2cbda8b70b767-1/hHtGjKHHyGRgb7Xm6L22/AB3i2Q03W@public.gmane.org>
@ 2018-09-10  2:35     ` Yong Wu
  0 siblings, 0 replies; 6+ messages in thread
From: Yong Wu @ 2018-09-10  2:35 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Hi Arvind,

     This patch looks lost. Could you help resend it after changing the
title to "iommu/mediatek:xxx"?

Thanks.

On Fri, 2018-09-07 at 14:21 +0800, Yong Wu (吴勇) wrote:
> From: Linux-mediatek [mailto:linux-mediatek-bounces@lists.infradead.org] On Behalf Of Arvind Yadav
> Sent: Monday, August 28, 2017 8:12 PM
> To: m.szyprowski@samsung.com; joro@8bytes.org; kgene@kernel.org; krzk@kernel.org; matthias.bgg@gmail.com; gerald.schaefer@de.ibm.com
> Cc: iommu@lists.linux-foundation.org; linux-mediatek@lists.infradead.org; linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> Subject: [PATCH 2/3] iommu: mtk: constify iommu_ops
> 
> iommu_ops are not supposed to change at runtime.
> Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with const iommu_ops provided by <linux/iommu.h>. So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  drivers/iommu/mtk_iommu.c    | 4 ++--
>  drivers/iommu/mtk_iommu_v1.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 91c6d36..eac99a3 100644
> --- a/drivers/iommu/mtk_iommu.c
> +++ b/drivers/iommu/mtk_iommu.c
> @@ -102,7 +102,7 @@ struct mtk_iommu_domain {
>  	struct iommu_domain		domain;
>  };
>  
> -static struct iommu_ops mtk_iommu_ops;
> +static const struct iommu_ops mtk_iommu_ops;
>  
>  static struct mtk_iommu_domain *to_mtk_domain(struct iommu_domain *dom)  { @@ -437,7 +437,7 @@ static int mtk_iommu_of_xlate(struct device *dev, struct of_phandle_args *args)
>  	return iommu_fwspec_add_ids(dev, args->args, 1);  }
>  
> -static struct iommu_ops mtk_iommu_ops = {
> +static const struct iommu_ops mtk_iommu_ops = {
>  	.domain_alloc	= mtk_iommu_domain_alloc,
>  	.domain_free	= mtk_iommu_domain_free,
>  	.attach_dev	= mtk_iommu_attach_device,
> diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index bc1efbf..40b231f 100644
> --- a/drivers/iommu/mtk_iommu_v1.c
> +++ b/drivers/iommu/mtk_iommu_v1.c
> @@ -363,7 +363,7 @@ static phys_addr_t mtk_iommu_iova_to_phys(struct iommu_domain *domain,
>  	return pa;
>  }
>  
> -static struct iommu_ops mtk_iommu_ops;
> +static const struct iommu_ops mtk_iommu_ops;
>  
>  /*
>   * MTK generation one iommu HW only support one iommu domain, and all the client @@ -536,7 +536,7 @@ static int mtk_iommu_hw_init(const struct mtk_iommu_data *data)
>  	return 0;
>  }
>  
> -static struct iommu_ops mtk_iommu_ops = {
> +static const struct iommu_ops mtk_iommu_ops = {
>  	.domain_alloc	= mtk_iommu_domain_alloc,
>  	.domain_free	= mtk_iommu_domain_free,
>  	.attach_dev	= mtk_iommu_attach_device,
> --
> 1.9.1
> 
> 
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek


_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2018-09-10  2:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28 12:12 [PATCH 2/3] iommu: mtk: constify iommu_ops Arvind Yadav
2017-08-28 12:12 ` Arvind Yadav
2017-08-30 13:18 ` Joerg Roedel
2017-08-30 13:18   ` Joerg Roedel
2017-08-30 13:18   ` Joerg Roedel
     [not found] <80e3d51296564c929a039ac83d83dd94@mtkmbs01n1.mediatek.inc>
     [not found] ` <d7decc0805d04c148bb2cbda8b70b767@MTKMBS31N1.mediatek.inc>
     [not found]   ` <d7decc0805d04c148bb2cbda8b70b767-1/hHtGjKHHyGRgb7Xm6L22/AB3i2Q03W@public.gmane.org>
2018-09-10  2:35     ` Yong Wu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.