Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1721562 > unrolled thread

[PATCH 3/3] iommu: s390: constify iommu_ops

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-28 14:20 +0200
Last post2017-08-30 15:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 3/3] iommu: s390: constify iommu_ops Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-28 14:20 +0200
    Re: [PATCH 3/3] iommu: s390: constify iommu_ops Gerald Schaefer <gerald.schaefer@de.ibm.com> - 2017-08-28 18:00 +0200
    Re: [PATCH 3/3] iommu: s390: constify iommu_ops Joerg Roedel <joro@8bytes.org> - 2017-08-30 15:30 +0200

#1721562 — [PATCH 3/3] iommu: s390: constify iommu_ops

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-28 14:20 +0200
Subject[PATCH 3/3] iommu: s390: constify iommu_ops
Message-ID<ujrbj-5ug-7@gated-at.bofh.it>
iommu_ops are not supposed to change at runtime.
Functions '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/s390-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c
index 8788640..400d75f 100644
--- a/drivers/iommu/s390-iommu.c
+++ b/drivers/iommu/s390-iommu.c
@@ -327,7 +327,7 @@ static size_t s390_iommu_unmap(struct iommu_domain *domain,
 	return size;
 }
 
-static struct iommu_ops s390_iommu_ops = {
+static const struct iommu_ops s390_iommu_ops = {
 	.capable = s390_iommu_capable,
 	.domain_alloc = s390_domain_alloc,
 	.domain_free = s390_domain_free,
-- 
1.9.1

[toc] | [next] | [standalone]


#1721768

FromGerald Schaefer <gerald.schaefer@de.ibm.com>
Date2017-08-28 18:00 +0200
Message-ID<ujuCd-7qi-9@gated-at.bofh.it>
In reply to#1721562
On Mon, 28 Aug 2017 17:42:50 +0530
Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:

> iommu_ops are not supposed to change at runtime.
> Functions '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/s390-iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>

> 
> diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c
> index 8788640..400d75f 100644
> --- a/drivers/iommu/s390-iommu.c
> +++ b/drivers/iommu/s390-iommu.c
> @@ -327,7 +327,7 @@ static size_t s390_iommu_unmap(struct iommu_domain *domain,
>  	return size;
>  }
> 
> -static struct iommu_ops s390_iommu_ops = {
> +static const struct iommu_ops s390_iommu_ops = {
>  	.capable = s390_iommu_capable,
>  	.domain_alloc = s390_domain_alloc,
>  	.domain_free = s390_domain_free,

[toc] | [prev] | [next] | [standalone]


#1723336

FromJoerg Roedel <joro@8bytes.org>
Date2017-08-30 15:30 +0200
Message-ID<ukbeb-oA-33@gated-at.bofh.it>
In reply to#1721562
On Mon, Aug 28, 2017 at 05:42:50PM +0530, Arvind Yadav wrote:
> iommu_ops are not supposed to change at runtime.
> Functions '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/s390-iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web