From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756935AbbCGJRi (ORCPT ); Sat, 7 Mar 2015 04:17:38 -0500 Received: from mail-ob0-f178.google.com ([209.85.214.178]:42256 "EHLO mail-ob0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751414AbbCGJR2 (ORCPT ); Sat, 7 Mar 2015 04:17:28 -0500 Message-ID: <54FAC1FD.504@gmail.com> Date: Sat, 07 Mar 2015 03:16:45 -0600 From: Nishanth Menon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Rob Herring CC: Geert Uytterhoeven , "linux-kernel@vger.kernel.org" , Grant Likely , Rob Herring , Mark Salter , Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org Subject: Re: [PATCH 06/20] c6x: convert fdt pointers to opaque pointers References: <1396563423-30893-1-git-send-email-robherring2@gmail.com> <1396563423-30893-7-git-send-email-robherring2@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 04/04/2014 02:57 AM, Geert Uytterhoeven wrote: > On Fri, Apr 4, 2014 at 12:16 AM, Rob Herring wrote: >> --- 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) >> { >> - struct boot_param_header *dtb = __va(dt_ptr); >> - struct boot_param_header *fdt = (struct boot_param_header *)_fdt_start; >> + const void *dtb = __va(dt_ptr); >> + const void *fdt = (const void *)_fdt_start; > > Unless it has changed recently, _fdt_start is "char _fdt_start[]", > so the cast should not be needed. Also, just noticed the following with evmc6678_defconfig 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 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); on current tip "af13e86 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux" Compiler used: c6x-linux-gnu-gcc (GCC) 4.9.2 20150107 (Red Hat Cross 4.9.2-3) Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.