All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
@ 2015-03-21 23:45 ` Stefan Agner
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Agner @ 2015-03-21 23:45 UTC (permalink / raw)
  To: rjui, sbranden, f.fainelli
  Cc: bcm, mporter, linux, jonathar, bcm-kernel-feedback-list,
	linux-arm-kernel, linux-kernel, llvmlinux, Stefan Agner

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.

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,
 };
-- 
2.3.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
@ 2015-03-21 23:45 ` Stefan Agner
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Agner @ 2015-03-21 23:45 UTC (permalink / raw)
  To: linux-arm-kernel

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.

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,
 };
-- 
2.3.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
  2015-03-21 23:45 ` Stefan Agner
@ 2015-03-24  5:18   ` Scott Branden
  -1 siblings, 0 replies; 10+ messages in thread
From: Scott Branden @ 2015-03-24  5:18 UTC (permalink / raw)
  To: Stefan Agner, rjui, f.fainelli
  Cc: bcm, mporter, linux, jonathar, bcm-kernel-feedback-list,
	linux-arm-kernel, linux-kernel, llvmlinux

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
@ 2015-03-24  5:18   ` Scott Branden
  0 siblings, 0 replies; 10+ messages in thread
From: Scott Branden @ 2015-03-24  5:18 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
  2015-03-24  5:18   ` Scott Branden
@ 2015-03-24  5:22     ` Ray Jui
  -1 siblings, 0 replies; 10+ messages in thread
From: Ray Jui @ 2015-03-24  5:22 UTC (permalink / raw)
  To: Scott Branden, Stefan Agner, f.fainelli
  Cc: bcm, mporter, linux, jonathar, bcm-kernel-feedback-list,
	linux-arm-kernel, linux-kernel, llvmlinux



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>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
@ 2015-03-24  5:22     ` Ray Jui
  0 siblings, 0 replies; 10+ messages in thread
From: Ray Jui @ 2015-03-24  5:22 UTC (permalink / raw)
  To: linux-arm-kernel



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>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
  2015-03-21 23:45 ` Stefan Agner
@ 2015-03-24  7:21   ` Uwe Kleine-König
  -1 siblings, 0 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2015-03-24  7:21 UTC (permalink / raw)
  To: Stefan Agner
  Cc: rjui, sbranden, f.fainelli, linux, bcm, llvmlinux, linux-kernel,
	mporter, jonathar, bcm-kernel-feedback-list, linux-arm-kernel

Hello Stefan,

On Sun, Mar 22, 2015 at 12:45:35AM +0100, 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.
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
@ 2015-03-24  7:21   ` Uwe Kleine-König
  0 siblings, 0 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2015-03-24  7:21 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Stefan,

On Sun, Mar 22, 2015 at 12:45:35AM +0100, 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.
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
  2015-03-21 23:45 ` Stefan Agner
@ 2015-03-24 22:14   ` Florian Fainelli
  -1 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2015-03-24 22:14 UTC (permalink / raw)
  To: Stefan Agner, rjui, sbranden, f.fainelli
  Cc: bcm, mporter, linux, jonathar, bcm-kernel-feedback-list,
	linux-arm-kernel, linux-kernel, llvmlinux

On 21/03/15 16:45, 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.
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Applied to platform/next, thanks
-- 
Florian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] ARM: cygnus: fix const declaration bcm_cygnus_dt_compat
@ 2015-03-24 22:14   ` Florian Fainelli
  0 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2015-03-24 22:14 UTC (permalink / raw)
  To: linux-arm-kernel

On 21/03/15 16:45, 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.
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>

Applied to platform/next, thanks
-- 
Florian

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-03-24 22:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.