From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752495AbbCXFSO (ORCPT ); Tue, 24 Mar 2015 01:18:14 -0400 Received: from mail-gw3-out.broadcom.com ([216.31.210.64]:51203 "EHLO mail-gw3-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275AbbCXFSL (ORCPT ); Tue, 24 Mar 2015 01:18:11 -0400 X-IronPort-AV: E=Sophos;i="5.11,456,1422950400"; d="scan'208";a="60084853" Message-ID: <5510F38C.6090501@broadcom.com> Date: Mon, 23 Mar 2015 22:18:04 -0700 From: Scott Branden User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Stefan Agner , , CC: , , , , , , , Subject: Re: [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat References: <1426981535-1800-1-git-send-email-stefan@agner.ch> In-Reply-To: <1426981535-1800-1-git-send-email-stefan@agner.ch> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stefan, On 15-03-21 04:45 PM, Stefan Agner wrote: > The const declaration for char* is actually duplicated, however > the array of strings is currently not constant. However, typically > the dt_compat array is declared as const char *const. Follow > that convention and also add the __initconst macro for constant > initialization data. > Acked-by: Scott Branden > Signed-off-by: Stefan Agner > --- > This was uncovered by a LLVM/clang warning: > arch/arm/mach-bcm/bcm_cygnus.c:16:19: warning: duplicate 'const' declaration > specifier [-Wduplicate-decl-specifier] > static const char const *bcm_cygnus_dt_compat[] = { > ^~~~~~ > 1 warning generated. > > arch/arm/mach-bcm/bcm_cygnus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-bcm/bcm_cygnus.c b/arch/arm/mach-bcm/bcm_cygnus.c > index 30dc58b..7ae894c 100644 > --- a/arch/arm/mach-bcm/bcm_cygnus.c > +++ b/arch/arm/mach-bcm/bcm_cygnus.c > @@ -13,7 +13,7 @@ > > #include > > -static const char const *bcm_cygnus_dt_compat[] = { > +static const char * const bcm_cygnus_dt_compat[] __initconst = { > "brcm,cygnus", > NULL, > }; > Thanks for submitting. We will test this. Scott