Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754329Ab1EWBhT (ORCPT ); Sun, 22 May 2011 21:37:19 -0400 Received: from terminus.zytor.com ([198.137.202.10]:52050 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753925Ab1EWBhQ (ORCPT ); Sun, 22 May 2011 21:37:16 -0400 Message-ID: <4DD9BA2F.9000303@zytor.com> Date: Sun, 22 May 2011 18:36:47 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 MIME-Version: 1.0 To: Eduardo Silva CC: Steven Rostedt , Frederic Weisbecker , Ingo Molnar , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kernel: Fix ftrace.c compiler warning when calling ftrace_nop_replace() References: <1306113548.29789.2.camel@monotop> In-Reply-To: <1306113548.29789.2.camel@monotop> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1007 Lines: 27 On 05/22/2011 06:19 PM, Eduardo Silva wrote: > the function ftrace_nop_replace() returns a 'static const unsigned char *' > value, so when the caller perform a direct assignment to a > 'static unsigned char *', the compiler raise the following warning message: > > ftrace.c:308:6: warning: assignment discards qualifiers from pointer target type > ftrace.c:318:6: warning: assignment discards qualifiers from pointer target type > > Adding the proper casts the message goes away. > > Signed-off-by: Eduardo Silva This quiets a warning of something that potentially looks like a real bug. Perhaps "new" should be const? -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. -- 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/