From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753197AbbCZOOF (ORCPT ); Thu, 26 Mar 2015 10:14:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57982 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752866AbbCZON7 (ORCPT ); Thu, 26 Mar 2015 10:13:59 -0400 Message-ID: <1427379238.9430.43.camel@deneb.redhat.com> Subject: Re: [PATCH v2] c6x: kernel: setup: Remove 'const' for local variables in machine_init From: Mark Salter To: Chen Gang Cc: a-jacquiot@ti.com, robh@kernel.org, "linux-c6x-dev@linux-c6x.org" , "linux-kernel@vger.kernel.org" Date: Thu, 26 Mar 2015 10:13:58 -0400 In-Reply-To: References: Organization: Red Hat, Inc Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-03-04 at 04:55 +0800, Chen Gang wrote: > early_init_dt_scan() accepts "void *", the related warning: > > CC arch/c6x/kernel/setup.o > arch/c6x/kernel/setup.c: In function 'machine_init': > arch/c6x/kernel/setup.c:290:21: warning: passing argument 1 of 'early_init_dt_scan' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] > early_init_dt_scan(fdt); > ^ > In file included from arch/c6x/kernel/setup.c:19:0: > include/linux/of_fdt.h:75:13: note: expected 'void *' but argument is of type 'const void *' > extern bool early_init_dt_scan(void *params); > ^ > > Signed-off-by: Chen Gang > --- Thanks! I added this to the c6x tree for next merge window. > arch/c6x/kernel/setup.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c > index f016128..1d9f399 100644 > --- a/arch/c6x/kernel/setup.c > +++ b/arch/c6x/kernel/setup.c > @@ -265,8 +265,8 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size) > */ > notrace void __init machine_init(unsigned long dt_ptr) > { > - const void *dtb = __va(dt_ptr); > - const void *fdt = _fdt_start; > + void *dtb = __va(dt_ptr); > + void *fdt = _fdt_start; > > /* interrupts must be masked */ > set_creg(IER, 2);