lkml.org 
[lkml]   [2011]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel: Fix ftrace.c compiler warning when calling ftrace_nop_replace()
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@redhat.com>
> 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@gmail.com>
> Signed-off-by: John Kacur <jkacur@redhat.com>

Looks much better.

Acked-by: H. Peter Anvin <hpa@zytor.com>

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-05-23 22:07    [W:0.034 / U:0.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site