Skip to contentSkip to conversation

clk: samsung: clk-s3c2410-dlck: do not use PNAME macro as it declares __initdata

PATCH New Heiko Stübner 2 participants 4 messages May 23, 2014 – May 27, 2014

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

PATCH 1/1 clk: samsung: clk-s3c2410-dlck: do not use PNAME macro as it declares __initdata

The originally used PNAME macro from the core samsung clock infrastructure declares the created array as initdata, creating section mismatch warnings in the dclk driver.

Thus declare them directly, removing these warning.

---
This should probably go though the samsung tree / arm-soc, as the offending patch is also in there.

 drivers/clk/samsung/clk-s3c2410-dclk.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/clk/samsung/clk-s3c2410-dclk.c +10 -10
index 8d8dff0..c1726f4 100644
@@ -135,26 +135,26 @@ struct s3c24xx_dclk {
 #define to_s3c24xx_dclk1(x) \
 		container_of(x, struct s3c24xx_dclk, dclk1_div_change_nb)
 
-PNAME(dclk_s3c2410_p) = { "pclk", "uclk" };
-PNAME(clkout0_s3c2410_p) = { "mpll", "upll", "fclk", "hclk", "pclk",
+static const char *dclk_s3c2410_p[] = { "pclk", "uclk" };
+static const char *clkout0_s3c2410_p[] = { "mpll", "upll", "fclk", "hclk", "pclk",
 			     "gate_dclk0" };
-PNAME(clkout1_s3c2410_p) = { "mpll", "upll", "fclk", "hclk", "pclk",
+static const char *clkout1_s3c2410_p[] = { "mpll", "upll", "fclk", "hclk", "pclk",
 			     "gate_dclk1" };
 
-PNAME(clkout0_s3c2412_p) = { "mpll", "upll", "rtc_clkout",
+static const char *clkout0_s3c2412_p[] = { "mpll", "upll", "rtc_clkout",
 			     "hclk", "pclk", "gate_dclk0" };
-PNAME(clkout1_s3c2412_p) = { "xti", "upll", "fclk", "hclk", "pclk",
+static const char *clkout1_s3c2412_p) = { "xti", "upll", "fclk", "hclk", "pclk",
 			     "gate_dclk1" };
 
-PNAME(clkout0_s3c2440_p) = { "xti", "upll", "fclk", "hclk", "pclk",
+static const char *clkout0_s3c2440_p[] = { "xti", "upll", "fclk", "hclk", "pclk",
 			     "gate_dclk0" };
-PNAME(clkout1_s3c2440_p) = { "mpll", "upll", "rtc_clkout",
+static const char *clkout1_s3c2440_p[] = { "mpll", "upll", "rtc_clkout",
 			     "hclk", "pclk", "gate_dclk1" };
 
-PNAME(dclk_s3c2443_p) = { "pclk", "epll" };
-PNAME(clkout0_s3c2443_p) = { "xti", "epll", "armclk", "hclk", "pclk",
+static const char *dclk_s3c2443_p[] = { "pclk", "epll" };
+static const char *clkout0_s3c2443_p[] = { "xti", "epll", "armclk", "hclk", "pclk",
 			     "gate_dclk0" };
-PNAME(clkout1_s3c2443_p) = { "dummy", "epll", "rtc_clkout",
+static const char *clkout1_s3c2443_p[] = { "dummy", "epll", "rtc_clkout",
 			     "hclk", "pclk", "gate_dclk1" };
 
 #define DCLKCON_DCLK_DIV_MASK		0xf
Signature · 1 line
1.9.0
#1 lore raw

PATCH 1/1 clk: samsung: clk-s3c2410-dlck: do not use PNAME macro as it declares __initdata

Quoted 11 lines · Heiko St?bner

The originally used PNAME macro from the core samsung clock infrastructure declares the created array as initdata, creating section mismatch warnings in the dclk driver.

Thus declare them directly, removing these warning.

---
This should probably go though the samsung tree / arm-soc, as the offending patch is also in there.

Applied on top of next/cleanup.

-Olof

#2 lore raw

PATCH 1/1 clk: samsung: clk-s3c2410-dlck: do not use PNAME macro as it declares __initdata

In reply to Heiko Stübner
Quoted 28 lines · Heiko St?bner

The originally used PNAME macro from the core samsung clock infrastructure declares the created array as initdata, creating section mismatch warnings in the dclk driver.

Thus declare them directly, removing these warning.

---
This should probably go though the samsung tree / arm-soc, as the offending patch is also in there.

 drivers/clk/samsung/clk-s3c2410-dclk.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/clk/samsung/clk-s3c2410-dclk.c +2 -2
index 8d8dff0..c1726f4 100644
@@ -135,26 +135,26 @@ struct s3c24xx_dclk {
 #define to_s3c24xx_dclk1(x) \
 		container_of(x, struct s3c24xx_dclk, dclk1_div_change_nb)
 
-PNAME(dclk_s3c2410_p) = { "pclk", "uclk" };
-PNAME(clkout0_s3c2410_p) = { "mpll", "upll", "fclk", "hclk", "pclk",
+static const char *dclk_s3c2410_p[] = { "pclk", "uclk" };
+static const char *clkout0_s3c2410_p[] = { "mpll", "upll", "fclk", "hclk", "pclk",
 			     "gate_dclk0" };

drivers/clk/samsung/clk-s3c2410-dclk.c struct s3c24xx_dclk { · line 147

Quoted 10 lines
drivers/clk/samsung/clk-s3c2410-dclk.c +3 -3
-PNAME(clkout1_s3c2410_p) = { "mpll", "upll", "fclk", "hclk", "pclk",
+static const char *clkout1_s3c2410_p[] = { "mpll", "upll", "fclk", "hclk", "pclk",
 			     "gate_dclk1" };
 
-PNAME(clkout0_s3c2412_p) = { "mpll", "upll", "rtc_clkout",
+static const char *clkout0_s3c2412_p[] = { "mpll", "upll", "rtc_clkout",
 			     "hclk", "pclk", "gate_dclk0" };
-PNAME(clkout1_s3c2412_p) = { "xti", "upll", "fclk", "hclk", "pclk",
+static const char *clkout1_s3c2412_p) = { "xti", "upll", "fclk", "hclk", "pclk",
 			     "gate_dclk1" };

Fixed up this error in a separate commit, since it caused a build failure.

In other words, please build test your fixes before you send them. :)

-Olof

#3 lore raw

PATCH 1/1 clk: samsung: clk-s3c2410-dlck: do not use PNAME macro as it declares __initdata

Am Montag, 26. Mai 2014, 14:21:19 schrieb Olof Johansson:

Quoted 43 lines · Heiko St?bner
Quoted 42 lines

The originally used PNAME macro from the core samsung clock infrastructure declares the created array as initdata, creating section mismatch warnings in the dclk driver.

Thus declare them directly, removing these warning.

---
This should probably go though the samsung tree / arm-soc, as the offending patch is also in there.

 drivers/clk/samsung/clk-s3c2410-dclk.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
(quoted diff) +0 -0

b/drivers/clk/samsung/clk-s3c2410-dclk.c index 8d8dff0..c1726f4 100644

drivers/clk/samsung/clk-s3c2410-dclk.c +2 -2
@@ -135,26 +135,26 @@ struct s3c24xx_dclk {
 
 #define to_s3c24xx_dclk1(x) \
 
 		container_of(x, struct s3c24xx_dclk, dclk1_div_change_nb)
 
-PNAME(dclk_s3c2410_p) = { "pclk", "uclk" };
-PNAME(clkout0_s3c2410_p) = { "mpll", "upll", "fclk", "hclk", "pclk",
+static const char *dclk_s3c2410_p[] = { "pclk", "uclk" };
+static const char *clkout0_s3c2410_p[] = { "mpll", "upll", "fclk",

"hclk", "pclk",>

drivers/clk/samsung/clk-s3c2410-dclk.c +1 -1
 			     "gate_dclk0" };
 
-PNAME(clkout1_s3c2410_p) = { "mpll", "upll", "fclk", "hclk", "pclk",
+static const char *clkout1_s3c2410_p[] = { "mpll", "upll", "fclk",

"hclk", "pclk",>

drivers/clk/samsung/clk-s3c2410-dclk.c +1 -1
 			     "gate_dclk1" };
 
-PNAME(clkout0_s3c2412_p) = { "mpll", "upll", "rtc_clkout",
+static const char *clkout0_s3c2412_p[] = { "mpll", "upll", "rtc_clkout",
 
 			     "hclk", "pclk", "gate_dclk0" };
Quoted 8 lines
Quoted 4 lines
drivers/clk/samsung/clk-s3c2410-dclk.c +1 -1
-PNAME(clkout1_s3c2412_p) = { "xti", "upll", "fclk", "hclk", "pclk",
+static const char *clkout1_s3c2412_p) = { "xti", "upll", "fclk", "hclk",

"pclk",>
"gate_dclk1" };

Fixed up this error in a separate commit, since it caused a build failure.

In other words, please build test your fixes before you send them. :)

sorry about that. I was so sure I did build test it, but when checking again now it in fact didn't build.

So sorry again
Heiko