Skip to contentSkip to conversation

ARM: exynos: Fix warning by constifying 'reg' in exynos_fdt_map_chipid()

PATCH New Viresh Kumar 3 participants 5 messages Jun 12, 2014 – Jun 23, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: exynos: Fix warning by constifying 'reg' in exynos_fdt_map_chipid()

exynos_fdt_map_chipid() was recently added with: cbf08b9 (ARM: EXYNOS:
Consolidate exynos4 and exynos5 machine files) and generates this warning:

arch/arm/mach-exynos/exynos.c: In function ?exynos_fdt_map_chipid?:
arch/arm/mach-exynos/exynos.c:208:6: warning: assignment discards ?const? qualifier from pointer target type [enabled by default]

Constify 'reg' to fix it.

---
 arch/arm/mach-exynos/exynos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-exynos/exynos.c +1 -1
index 90aab4d..b71598a 100644
@@ -198,7 +198,7 @@ static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
 					int depth, void *data)
 {
 	struct map_desc iodesc;
-	__be32 *reg;
+	const __be32 *reg;
 	int len;
 
 	if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") &&
Signature · 1 line
2.0.0.rc2
#1 lore raw

PATCH 1/1 ARM: exynos: Fix warning by constifying 'reg' in exynos_fdt_map_chipid()

Fix Sachin's id, looks like he left Linaro ..

Quoted 29 lines · Viresh Kumar

exynos_fdt_map_chipid() was recently added with: cbf08b9 (ARM: EXYNOS:
Consolidate exynos4 and exynos5 machine files) and generates this warning:

arch/arm/mach-exynos/exynos.c: In function ?exynos_fdt_map_chipid?:
arch/arm/mach-exynos/exynos.c:208:6: warning: assignment discards ?const? qualifier from pointer target type [enabled by default]

Constify 'reg' to fix it.

---
 arch/arm/mach-exynos/exynos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-exynos/exynos.c +1 -2
index 90aab4d..b71598a 100644
@@ -198,7 +198,7 @@ static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
                                        int depth, void *data)
 {
        struct map_desc iodesc;
-       __be32 *reg;
+       const __be32 *reg;
        int len;
 
        if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") &&
--

2.0.0.rc2

#2 lore raw

PATCH 1/1 ARM: exynos: Fix warning by constifying 'reg' in exynos_fdt_map_chipid()

Hi Viresh,

Quoted 12 lines · Viresh Kumar

Fix Sachin's id, looks like he left Linaro ..

Quoted 9 lines · Viresh Kumar

exynos_fdt_map_chipid() was recently added with: cbf08b9 (ARM: EXYNOS:
Consolidate exynos4 and exynos5 machine files) and generates this warning:

arch/arm/mach-exynos/exynos.c: In function ?exynos_fdt_map_chipid?:
arch/arm/mach-exynos/exynos.c:208:6: warning: assignment discards ?const? qualifier from pointer target type [enabled by default]

Constify 'reg' to fix it.

I have already posted a patch [1] to fix this.
Kukjin, can you please queue this up.

[1] http://www.spinics.net/lists/arm-kernel/msg328216.html

#3 lore raw

PATCH 1/1 ARM: exynos: Fix warning by constifying 'reg' in exynos_fdt_map_chipid()

Quoted 14 lines · Sachin Kamat

Hi Viresh,

Quoted 8 lines · Viresh Kumar

Fix Sachin's id, looks like he left Linaro ..

Quoted 5 lines · Viresh Kumar

exynos_fdt_map_chipid() was recently added with: cbf08b9 (ARM: EXYNOS:
Consolidate exynos4 and exynos5 machine files) and generates this warning:

arch/arm/mach-exynos/exynos.c: In function ?exynos_fdt_map_chipid?:
arch/arm/mach-exynos/exynos.c:208:6: warning: assignment discards ?const? qualifier

from pointer target type [enabled by default]

Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

Constify 'reg' to fix it.

I have already posted a patch [1] to fix this.
Kukjin, can you please queue this up.

[1] http://www.spinics.net/lists/arm-kernel/msg328216.html

+ Arnd

If I remember correctly, it should be queued by Arnd?

Arnd, do you want me to take it?

- Kukjin

#4 lore raw

PATCH 1/1 ARM: exynos: Fix warning by constifying 'reg' in exynos_fdt_map_chipid()

Quoted 22 lines · Kukjin Kim
Quoted 21 lines · Sachin Kamat

Hi Viresh,

Quoted 8 lines · Viresh Kumar

Fix Sachin's id, looks like he left Linaro ..

Quoted 5 lines · Viresh Kumar

exynos_fdt_map_chipid() was recently added with: cbf08b9 (ARM: EXYNOS:
Consolidate exynos4 and exynos5 machine files) and generates this warning:

arch/arm/mach-exynos/exynos.c: In function ?exynos_fdt_map_chipid?:
arch/arm/mach-exynos/exynos.c:208:6: warning: assignment discards ?const? qualifier

from pointer target type [enabled by default]

Quoted 4 lines
Quoted 4 lines

Constify 'reg' to fix it.

I have already posted a patch [1] to fix this.
Kukjin, can you please queue this up.

Quoted 7 lines
Quoted 1 line

[1] http://www.spinics.net/lists/arm-kernel/msg328216.html

+ Arnd

If I remember correctly, it should be queued by Arnd?

Arnd, do you want me to take it?

This patch has now been merged into 3.16-rc2.

Regards,
Sachin.