Skip to contentSkip to conversation

drivers/clk/Kconfig: fix "related" typo in help text

PATCH In review Peter Korsgaard 3 participants 6 messages Jan 19 – Jan 21

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

PATCH 1/2 drivers/clk/Kconfig: fix "related" typo in help text

It looks like the original zynqmp typo was copied to versal as well. Fix both.

---
 drivers/clk/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/Kconfig +2 -2
index ae783254008..c88931c8ec4 100644
@@ -228,7 +228,7 @@ config CLK_VERSAL
 	depends on (ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2)
 	depends on ZYNQMP_FIRMWARE
 	help
-	  This clock driver adds support for clock realted settings for
+	  This clock driver adds support for clock related settings for
 	  Versal platform.
 
 config CLK_VEXPRESS_OSC
@@ -262,7 +262,7 @@ config CLK_ZYNQMP
 	depends on ARCH_ZYNQMP
 	imply ZYNQMP_FIRMWARE
 	help
-	  This clock driver adds support for clock realted settings for
+	  This clock driver adds support for clock related settings for
 	  ZynqMP platform.
 
 source "drivers/clk/adi/Kconfig"
Signature · 1 line
2.47.3
#1 lore raw

PATCH 2/2 drivers/clk/clk_zynqmp.c: get rid of compiler warning for !CONFIG_CMD_CLK builds

When built without CONFIG_CMD_CLK, we get a warning about the unused clk_names variable:

../drivers/clk/clk_zynqmp.c:153:27: warning: ‘clk_names’ defined but not used [-Wunused-const-variable=]
153 | static const char * const clk_names[clk_max] = {

So also guard it with CONFIG_CMD_CLK to get rid of that.

---
 drivers/clk/clk_zynqmp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/clk_zynqmp.c +2 -0
index 7a433a667a4..765cae92241 100644
@@ -150,6 +150,7 @@ enum zynqmp_clk {
 	clk_max,
 };
 
+#if IS_ENABLED(CONFIG_CMD_CLK)
 static const char * const clk_names[clk_max] = {
 	"iopll", "rpll", "apll", "dpll",
 	"vpll", "iopll_to_fpd", "rpll_to_fpd",
@@ -177,6 +178,7 @@ static const char * const clk_names[clk_max] = {
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, "gem0_ref", "gem1_ref", "gem2_ref", "gem3_ref",
 };
+#endif
 
 static const u32 pll_src[][4] = {
 	{apll, 0xff, dpll, vpll},		/* acpu */
Signature · 1 line
2.47.3
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drivers/clk/clk_zynqmp.c: get rid of compiler warning for !CONFIG_CMD_CLK builds

Hi Peter,

Quoted 8 lines · Peter Korsgaard

When built without CONFIG_CMD_CLK, we get a warning about the unused clk_names variable:

../drivers/clk/clk_zynqmp.c:153:27: warning: ‘clk_names’ defined but not used [-Wunused-const-variable=]
153 | static const char * const clk_names[clk_max] = {

So also guard it with CONFIG_CMD_CLK to get rid of that.

Considering it's only used within zynqmp_clk_dump() which is already guarded, maybe we could put the static array and its user next to each other?

In any case,

Thanks!
Quentin

#3 lore raw

Re: [PATCH 2/2] drivers/clk/clk_zynqmp.c: get rid of compiler warning for !CONFIG_CMD_CLK builds

Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Quentin" == Quentin Schulz <[email protected]> writes:

Hi Peter,

Quoted 7 lines · Peter Korsgaard

When built without CONFIG_CMD_CLK, we get a warning about the unused clk_names variable:
../drivers/clk/clk_zynqmp.c:153:27: warning: ‘clk_names’ defined but not used [-Wunused-const-variable=]
153 | static const char * const clk_names[clk_max] = {
So also guard it with CONFIG_CMD_CLK to get rid of that.

Quoted 3 lines

Considering it's only used within zynqmp_clk_dump() which is already guarded, maybe we could put the static array and its user next to each other?

That is also an option. I opted for just adding the guards to keep the diff small.

I can send a v2 doing the move if that is preferred?

Quoted 6 lines

In any case,

Thanks!
Quentin

Signature · 1 line
Bye, Peter Korsgaard
maintainer
#5 lore raw
In reply to Peter Korsgaard
Quoted 22 lines · Peter Korsgaard

It looks like the original zynqmp typo was copied to versal as well. Fix both.

---
  drivers/clk/Kconfig | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/Kconfig +1 -1
index ae783254008..c88931c8ec4 100644
@@ -228,7 +228,7 @@ config CLK_VERSAL
  	depends on (ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2)
  	depends on ZYNQMP_FIRMWARE
  	help
-	  This clock driver adds support for clock realted settings for
+	  This clock driver adds support for clock related settings for
  	  Versal platform.
 
  config CLK_VEXPRESS_OSC

drivers/clk/Kconfig config CLK_ZYNQMP · line 268

Quoted 8 lines
drivers/clk/Kconfig +1 -1
@@ -262,7 +262,7 @@ config CLK_ZYNQMP
  	depends on ARCH_ZYNQMP
  	imply ZYNQMP_FIRMWARE
  	help
-	  This clock driver adds support for clock realted settings for
+	  This clock driver adds support for clock related settings for
  	  ZynqMP platform.
 
  source "drivers/clk/adi/Kconfig"

Applied both.
M