Skip to contentSkip to conversation

ARM: shmobile: lager: Constify lager_boards_compat_dt

PATCH New Simon Horman 3 participants 3 messages Nov 22, 2013 – Nov 28, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: shmobile: lager: Constify lager_boards_compat_dt

lager_boards_compat_dt is kmemdup()ed when the corresponding devices are registered and can thus be declared as const. Do so.

This replicates a portion of 27113d63daac0aac ("ARM: shmobile: lager:
Constify platform data and resources") which appears to have inadvertently been lost during merging.

Cc Laurent Pinchart <[email protected]>
---
 arch/arm/mach-shmobile/board-lager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/board-lager.c +1 -1
index d47052e..04c5ca8 100644
@@ -249,7 +249,7 @@ static void __init lager_init(void)
 	phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup);
 }
 
-static const char * const lager_boards_compat_dt[] __initconst = {
+static const char *lager_boards_compat_dt[] __initdata = {
 	"renesas,lager",
 	NULL,
 };
Signature · 1 line
1.8.4
#1 lore raw

PATCH 1/1 ARM: shmobile: lager: Constify lager_boards_compat_dt

Hello.

Quoted 18 lines · Simon Horman

lager_boards_compat_dt is kmemdup()ed when the corresponding devices are registered and can thus be declared as const. Do so.

This replicates a portion of 27113d63daac0aac ("ARM: shmobile: lager:
Constify platform data and resources") which appears to have inadvertently been lost during merging.

Cc Laurent Pinchart <[email protected]>
---
  arch/arm/mach-shmobile/board-lager.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/board-lager.c +0 -0
index d47052e..04c5ca8 100644

arch/arm/mach-shmobile/board-lager.c static void __init lager_init(void) · line 254

Quoted 7 lines
arch/arm/mach-shmobile/board-lager.c +1 -1
@@ -249,7 +249,7 @@ static void __init lager_init(void)
  	phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup);
  }
 
-static const char * const lager_boards_compat_dt[] __initconst = {
+static const char *lager_boards_compat_dt[] __initdata = {
  	"renesas,lager",
  	NULL,

But aren't you in fact reverting the described change?

WBR, Sergei

#2 lore raw

PATCH 1/1 ARM: shmobile: lager: Constify lager_boards_compat_dt

Quoted 25 lines · Sergei Shtylyov

Hello.

Quoted 21 lines · Simon Horman

lager_boards_compat_dt is kmemdup()ed when the corresponding devices are registered and can thus be declared as const. Do so.

This replicates a portion of 27113d63daac0aac ("ARM: shmobile: lager:
Constify platform data and resources") which appears to have inadvertently been lost during merging.

Cc Laurent Pinchart <[email protected]>
---
 arch/arm/mach-shmobile/board-lager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/board-lager.c +0 -0
index d47052e..04c5ca8 100644
@@ -249,7 +249,7 @@ static void __init lager_init(void)
 	phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup);
 }
 
Quoted 6 lines

arch/arm/mach-shmobile/board-lager.c static void __init lager_init(void) · line 254

Quoted 4 lines
arch/arm/mach-shmobile/board-lager.c +1 -1
-static const char * const lager_boards_compat_dt[] __initconst = {
+static const char *lager_boards_compat_dt[] __initdata = {
 	"renesas,lager",
 	NULL,

But aren't you in fact reverting the described change?

Yes. This patch is completely bogus.