linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sbranden@broadcom.com (Scott Branden)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
Date: Mon, 23 Mar 2015 22:18:04 -0700	[thread overview]
Message-ID: <5510F38C.6090501@broadcom.com> (raw)
In-Reply-To: <1426981535-1800-1-git-send-email-stefan@agner.ch>

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

  reply	other threads:[~2015-03-24  5:18 UTC|newest]

Thread overview: 5+ 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-24  5:18 ` Scott Branden [this message]
2015-03-24  5:22   ` Ray Jui
2015-03-24  7:21 ` Uwe Kleine-König
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=5510F38C.6090501@broadcom.com \
    --to=sbranden@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).