drivers/clk/Kconfig: fix "related" typo in help text
Subsystems (2)
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
@@ -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
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
@@ -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
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 unusedclk_namesvariable:
../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_CLKto 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
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 unusedclk_namesvariable:../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 withCONFIG_CMD_CLKto 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,
Reviewed-by Quentin Schulz <[email protected]>Thanks!
Quentin
Signature · 1 line
Bye, Peter Korsgaard
Hi Peter,
Quoted 3 lines · Peter Korsgaard
It looks like the original zynqmp typo was copied to versal as well. Fix both.
Thanks!
Quentin
Michal Simek
maintainerQuoted 22 lines · Peter Korsgaard
It looks like the original zynqmp typo was copied to versal as well. Fix both.
Signed-off-by Peter Korsgaard <[email protected]>--- drivers/clk/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/clk/Kconfig +1
-1@@ -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