* [PATCH] iommu: Make of_device_id array const
@ 2014-09-11 13:37 Kiran Padwal
2014-09-11 13:51 ` Will Deacon
2014-09-25 14:01 ` Joerg Roedel
0 siblings, 2 replies; 4+ messages in thread
From: Kiran Padwal @ 2014-09-11 13:37 UTC (permalink / raw)
To: linux-arm-kernel
Make of_device_id array const, because all OF functions handle it as const.
Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
---
drivers/iommu/arm-smmu.c | 2 +-
drivers/iommu/omap-iommu.c | 2 +-
drivers/iommu/tegra-gart.c | 2 +-
drivers/iommu/tegra-smmu.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index ca18d6d..095f4e5 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1993,7 +1993,7 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
}
#ifdef CONFIG_OF
-static struct of_device_id arm_smmu_of_match[] = {
+static const struct of_device_id arm_smmu_of_match[] = {
{ .compatible = "arm,smmu-v1", },
{ .compatible = "arm,smmu-v2", },
{ .compatible = "arm,mmu-400", },
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index e202b0c..47517cf 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1006,7 +1006,7 @@ static int omap_iommu_remove(struct platform_device *pdev)
return 0;
}
-static struct of_device_id omap_iommu_of_match[] = {
+static const struct of_device_id omap_iommu_of_match[] = {
{ .compatible = "ti,omap2-iommu" },
{ .compatible = "ti,omap4-iommu" },
{ .compatible = "ti,dra7-iommu" },
diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
index b10a8ec..d6a3a09 100644
--- a/drivers/iommu/tegra-gart.c
+++ b/drivers/iommu/tegra-gart.c
@@ -416,7 +416,7 @@ static const struct dev_pm_ops tegra_gart_pm_ops = {
.resume = tegra_gart_resume,
};
-static struct of_device_id tegra_gart_of_match[] = {
+static const struct of_device_id tegra_gart_of_match[] = {
{ .compatible = "nvidia,tegra20-gart", },
{ },
};
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 3ded389..05860a4 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -1260,7 +1260,7 @@ static const struct dev_pm_ops tegra_smmu_pm_ops = {
.resume = tegra_smmu_resume,
};
-static struct of_device_id tegra_smmu_of_match[] = {
+static const struct of_device_id tegra_smmu_of_match[] = {
{ .compatible = "nvidia,tegra30-smmu", },
{ },
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] iommu: Make of_device_id array const
2014-09-11 13:37 [PATCH] iommu: Make of_device_id array const Kiran Padwal
@ 2014-09-11 13:51 ` Will Deacon
2014-09-12 12:44 ` kiran.padwal at smartplayin.com
2014-09-25 14:01 ` Joerg Roedel
1 sibling, 1 reply; 4+ messages in thread
From: Will Deacon @ 2014-09-11 13:51 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Sep 11, 2014 at 02:37:36PM +0100, Kiran Padwal wrote:
> Make of_device_id array const, because all OF functions handle it as const.
>
> Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
> ---
> drivers/iommu/arm-smmu.c | 2 +-
> drivers/iommu/omap-iommu.c | 2 +-
> drivers/iommu/tegra-gart.c | 2 +-
> drivers/iommu/tegra-smmu.c | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
Ha, I've seen a few of these patches recently. Did some tool just get
support for detecting this?
Anyway, looks fine and should probably go via Joerg.
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iommu: Make of_device_id array const
2014-09-11 13:51 ` Will Deacon
@ 2014-09-12 12:44 ` kiran.padwal at smartplayin.com
0 siblings, 0 replies; 4+ messages in thread
From: kiran.padwal at smartplayin.com @ 2014-09-12 12:44 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday, September 11, 2014 9:51am, "Will Deacon" <will.deacon@arm.com> said:
> On Thu, Sep 11, 2014 at 02:37:36PM +0100, Kiran Padwal wrote:
>> Make of_device_id array const, because all OF functions handle it as const.
>>
>> Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
>> ---
>> drivers/iommu/arm-smmu.c | 2 +-
>> drivers/iommu/omap-iommu.c | 2 +-
>> drivers/iommu/tegra-gart.c | 2 +-
>> drivers/iommu/tegra-smmu.c | 2 +-
>> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> Ha, I've seen a few of these patches recently. Did some tool just get
> support for detecting this?
No
>
> Anyway, looks fine and should probably go via Joerg.
>
> Will
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] iommu: Make of_device_id array const
2014-09-11 13:37 [PATCH] iommu: Make of_device_id array const Kiran Padwal
2014-09-11 13:51 ` Will Deacon
@ 2014-09-25 14:01 ` Joerg Roedel
1 sibling, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2014-09-25 14:01 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Sep 11, 2014 at 07:07:36PM +0530, Kiran Padwal wrote:
> Make of_device_id array const, because all OF functions handle it as const.
>
> Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
> ---
> drivers/iommu/arm-smmu.c | 2 +-
> drivers/iommu/omap-iommu.c | 2 +-
> drivers/iommu/tegra-gart.c | 2 +-
> drivers/iommu/tegra-smmu.c | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-25 14:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 13:37 [PATCH] iommu: Make of_device_id array const Kiran Padwal
2014-09-11 13:51 ` Will Deacon
2014-09-12 12:44 ` kiran.padwal at smartplayin.com
2014-09-25 14:01 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).