diff mbox

iommu: Make of_device_id array const

Message ID 1410442656-21112-1-git-send-email-kiran.padwal@smartplayin.com (mailing list archive)
State New, archived
Headers show

Commit Message

kiran.padwal@smartplayin.com Sept. 11, 2014, 1:37 p.m. UTC
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(-)

Comments

Will Deacon Sept. 11, 2014, 1:51 p.m. UTC | #1
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
kiran.padwal@smartplayin.com Sept. 12, 2014, 12:44 p.m. UTC | #2
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
>
Joerg Roedel Sept. 25, 2014, 2:01 p.m. UTC | #3
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.
diff mbox

Patch

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", },
 	{ },
 };