From: rjui@broadcom.com (Ray Jui)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
Date: Mon, 23 Mar 2015 22:22:51 -0700 [thread overview]
Message-ID: <5510F4AB.1000101@broadcom.com> (raw)
In-Reply-To: <5510F38C.6090501@broadcom.com>
On 3/23/2015 10:18 PM, Scott Branden wrote:
> 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 <sbranden@broadcom.com>
>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>> ---
>> 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 <asm/mach/arch.h>
>>
>> -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
Change looks fine and tested fine on Cygnus BCM958300k board. Thanks!
Reviewed-by: Ray Jui <rjui@broadcom.com>
Tested-by: Ray Jui <rjui@broadcom.com>
WARNING: multiple messages have this Message-ID (diff)
From: Ray Jui <rjui@broadcom.com>
To: Scott Branden <sbranden@broadcom.com>,
Stefan Agner <stefan@agner.ch>, <f.fainelli@gmail.com>
Cc: <bcm@fixthebug.org>, <mporter@linaro.org>,
<linux@arm.linux.org.uk>, <jonathar@broadcom.com>,
<bcm-kernel-feedback-list@broadcom.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<llvmlinux@lists.linuxfoundation.org>
Subject: Re: [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
Date: Mon, 23 Mar 2015 22:22:51 -0700 [thread overview]
Message-ID: <5510F4AB.1000101@broadcom.com> (raw)
In-Reply-To: <5510F38C.6090501@broadcom.com>
On 3/23/2015 10:18 PM, Scott Branden wrote:
> 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 <sbranden@broadcom.com>
>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>> ---
>> 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 <asm/mach/arch.h>
>>
>> -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
Change looks fine and tested fine on Cygnus BCM958300k board. Thanks!
Reviewed-by: Ray Jui <rjui@broadcom.com>
Tested-by: Ray Jui <rjui@broadcom.com>
next prev parent reply other threads:[~2015-03-24 5:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-21 23:45 [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat Stefan Agner
2015-03-21 23:45 ` Stefan Agner
2015-03-24 5:18 ` Scott Branden
2015-03-24 5:18 ` Scott Branden
2015-03-24 5:22 ` Ray Jui [this message]
2015-03-24 5:22 ` Ray Jui
2015-03-24 7:21 ` Uwe Kleine-König
2015-03-24 7:21 ` Uwe Kleine-König
2015-03-24 22:14 ` Florian Fainelli
2015-03-24 22:14 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5510F4AB.1000101@broadcom.com \
--to=rjui@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.