diff mbox

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

Message ID 3c6b5c1f19fcbee39a3f0a0bd2c9ddd811d5e619.1402547301.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar June 12, 2014, 4:30 a.m. UTC
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.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-exynos/exynos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Viresh Kumar June 12, 2014, 4:34 a.m. UTC | #1
Fix Sachin's id, looks like he left Linaro ..

On 12 June 2014 10:00, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> 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.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  arch/arm/mach-exynos/exynos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index 90aab4d..b71598a 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -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
>
Sachin Kamat June 12, 2014, 4:49 a.m. UTC | #2
Hi Viresh,

On Thu, Jun 12, 2014 at 10:04 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Fix Sachin's id, looks like he left Linaro ..
>
> On 12 June 2014 10:00, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> 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.
>>
>> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

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
Kukjin Kim June 23, 2014, 1:14 a.m. UTC | #3
Sachin Kamat wrote:
> 
> Hi Viresh,
> 
> On Thu, Jun 12, 2014 at 10:04 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > Fix Sachin's id, looks like he left Linaro ..
> >
> > On 12 June 2014 10:00, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >> 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.
> >>
> >> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> 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
Sachin Kamat June 23, 2014, 3:18 a.m. UTC | #4
On Mon, Jun 23, 2014 at 6:44 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> Sachin Kamat wrote:
>>
>> Hi Viresh,
>>
>> On Thu, Jun 12, 2014 at 10:04 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> > Fix Sachin's id, looks like he left Linaro ..
>> >
>> > On 12 June 2014 10:00, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> >> 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.
>> >>
>> >> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>>
>> 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?

This patch has now been merged into 3.16-rc2.

Regards,
Sachin.
diff mbox

Patch

diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 90aab4d..b71598a 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -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") &&