Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1721564 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-08-28 14:20 +0200 |
| Last post | 2017-08-30 15:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] iommu: exynos: constify iommu_ops Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-28 14:20 +0200
Re: [PATCH 1/3] iommu: exynos: constify iommu_ops Marek Szyprowski <m.szyprowski@samsung.com> - 2017-08-28 15:20 +0200
Re: [PATCH 1/3] iommu: exynos: constify iommu_ops Joerg Roedel <joro@8bytes.org> - 2017-08-30 15:20 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-28 14:20 +0200 |
| Subject | [PATCH 1/3] iommu: exynos: constify iommu_ops |
| Message-ID | <ujrbj-5ug-11@gated-at.bofh.it> |
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/exynos-iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 2395478..a540016 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -569,7 +569,7 @@ static void sysmmu_tlb_invalidate_entry(struct sysmmu_drvdata *data,
spin_unlock_irqrestore(&data->lock, flags);
}
-static struct iommu_ops exynos_iommu_ops;
+static const struct iommu_ops exynos_iommu_ops;
static int __init exynos_sysmmu_probe(struct platform_device *pdev)
{
@@ -1323,7 +1323,7 @@ static int exynos_iommu_of_xlate(struct device *dev,
return 0;
}
-static struct iommu_ops exynos_iommu_ops = {
+static const struct iommu_ops exynos_iommu_ops = {
.domain_alloc = exynos_iommu_domain_alloc,
.domain_free = exynos_iommu_domain_free,
.attach_dev = exynos_iommu_attach_device,
--
1.9.1
[toc] | [next] | [standalone]
| From | Marek Szyprowski <m.szyprowski@samsung.com> |
|---|---|
| Date | 2017-08-28 15:20 +0200 |
| Message-ID | <ujs7p-62E-21@gated-at.bofh.it> |
| In reply to | #1721564 |
Hi Arvind,
On 2017-08-28 14:12, 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>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
I remember that in the past there were a reason for non-const iommu_ops
in the
IOMMU API, but I hope it has been finally resolved.
> ---
> drivers/iommu/exynos-iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
> index 2395478..a540016 100644
> --- a/drivers/iommu/exynos-iommu.c
> +++ b/drivers/iommu/exynos-iommu.c
> @@ -569,7 +569,7 @@ static void sysmmu_tlb_invalidate_entry(struct sysmmu_drvdata *data,
> spin_unlock_irqrestore(&data->lock, flags);
> }
>
> -static struct iommu_ops exynos_iommu_ops;
> +static const struct iommu_ops exynos_iommu_ops;
>
> static int __init exynos_sysmmu_probe(struct platform_device *pdev)
> {
> @@ -1323,7 +1323,7 @@ static int exynos_iommu_of_xlate(struct device *dev,
> return 0;
> }
>
> -static struct iommu_ops exynos_iommu_ops = {
> +static const struct iommu_ops exynos_iommu_ops = {
> .domain_alloc = exynos_iommu_domain_alloc,
> .domain_free = exynos_iommu_domain_free,
> .attach_dev = exynos_iommu_attach_device,
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
[toc] | [prev] | [next] | [standalone]
| From | Joerg Roedel <joro@8bytes.org> |
|---|---|
| Date | 2017-08-30 15:20 +0200 |
| Message-ID | <ukb4v-li-31@gated-at.bofh.it> |
| In reply to | #1721564 |
On Mon, Aug 28, 2017 at 05:42:05PM +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/exynos-iommu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web