Re: [PATCH] kernel: Fix ftrace.c compiler warning when calling ftrace_nop_replace()
From: H. Peter Anvin
Date: Mon May 23 2011 - 16:05:31 EST
On 05/23/2011 01:01 PM, John Kacur wrote:
> On Mon, 23 May 2011, Steven Rostedt wrote:
>> The real solution is to change all the users into const *. This should
>> be doable as the new and old pointers are not modified.
>
> From 71d6e5971cc90a03fd2d7bf8aaa2b81932bd0c7c Mon Sep 17 00:00:00 2001
> From: John Kacur <jkacur@xxxxxxxxxx>
> Date: Mon, 23 May 2011 21:24:27 +0200
> Subject: [PATCH] ftrace: Change unsigned char *new, *old to const
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> This removes the warning:
> arch/x86/kernel/ftrace.c: In function ʽftrace_make_nopʼ:
> /arch/x86/kernel/ftrace.c:308: warning: assignment discards qualifiers from pointer target type
>
> Steven Rostedt suggested to make these pointers const pointers.
>
> This patch assumes that
> https://patchwork.kernel.org/patch/798172/
> is applied first.
>
> Reported-by: Eduardo Silva <edsiper@xxxxxxxxx>
> Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>
Looks much better.
Acked-by: H. Peter Anvin <hpa@xxxxxxxxx>
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/