linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: rockchip: Fix initialization of mux_pll_src_4plls_p
@ 2020-08-10  4:40 Nathan Chancellor
  2020-08-12  7:52 ` Stephen Boyd
  2020-08-19  3:09 ` Stephen Boyd
  0 siblings, 2 replies; 4+ messages in thread
From: Nathan Chancellor @ 2020-08-10  4:40 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Heiko Stuebner, linux-clk, linux-arm-kernel, linux-rockchip,
	linux-kernel, clang-built-linux, Nathan Chancellor

A new warning in Clang points out that the initialization of
mux_pll_src_4plls_p appears incorrect:

../drivers/clk/rockchip/clk-rk3228.c:140:58: warning: suspicious
concatenation of string literals in an array initialization; did you
mean to separate the elements with a comma? [-Wstring-concatenation]
PNAME(mux_pll_src_4plls_p)      = { "cpll", "gpll", "hdmiphy" "usb480m" };
                                                              ^
                                                             ,
../drivers/clk/rockchip/clk-rk3228.c:140:48: note: place parentheses
around the string literal to silence warning
PNAME(mux_pll_src_4plls_p)      = { "cpll", "gpll", "hdmiphy" "usb480m" };
                                                    ^
1 warning generated.

Given the name of the variable and the same variable name in rv1108, it
seems that this should have been four distinct elements. Fix it up by
adding the comma as suggested.

Fixes: 307a2e9ac524 ("clk: rockchip: add clock controller for rk3228")
Link: https://github.com/ClangBuiltLinux/linux/issues/1123
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/clk/rockchip/clk-rk3228.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c
index d7243c09cc84..47d6482dda9d 100644
--- a/drivers/clk/rockchip/clk-rk3228.c
+++ b/drivers/clk/rockchip/clk-rk3228.c
@@ -137,7 +137,7 @@ PNAME(mux_usb480m_p)		= { "usb480m_phy", "xin24m" };
 PNAME(mux_hdmiphy_p)		= { "hdmiphy_phy", "xin24m" };
 PNAME(mux_aclk_cpu_src_p)	= { "cpll_aclk_cpu", "gpll_aclk_cpu", "hdmiphy_aclk_cpu" };
 
-PNAME(mux_pll_src_4plls_p)	= { "cpll", "gpll", "hdmiphy" "usb480m" };
+PNAME(mux_pll_src_4plls_p)	= { "cpll", "gpll", "hdmiphy", "usb480m" };
 PNAME(mux_pll_src_3plls_p)	= { "cpll", "gpll", "hdmiphy" };
 PNAME(mux_pll_src_2plls_p)	= { "cpll", "gpll" };
 PNAME(mux_sclk_hdmi_cec_p)	= { "cpll", "gpll", "xin24m" };
-- 
2.28.0


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

* Re: [PATCH] clk: rockchip: Fix initialization of mux_pll_src_4plls_p
  2020-08-10  4:40 [PATCH] clk: rockchip: Fix initialization of mux_pll_src_4plls_p Nathan Chancellor
@ 2020-08-12  7:52 ` Stephen Boyd
  2020-08-12 19:23   ` Heiko Stuebner
  2020-08-19  3:09 ` Stephen Boyd
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2020-08-12  7:52 UTC (permalink / raw)
  To: Michael Turquette, Nathan Chancellor
  Cc: Heiko Stuebner, linux-clk, linux-arm-kernel, linux-rockchip,
	linux-kernel, clang-built-linux, Nathan Chancellor

Quoting Nathan Chancellor (2020-08-09 21:40:20)
> A new warning in Clang points out that the initialization of
> mux_pll_src_4plls_p appears incorrect:
> 
> ../drivers/clk/rockchip/clk-rk3228.c:140:58: warning: suspicious
> concatenation of string literals in an array initialization; did you
> mean to separate the elements with a comma? [-Wstring-concatenation]
> PNAME(mux_pll_src_4plls_p)      = { "cpll", "gpll", "hdmiphy" "usb480m" };
>                                                               ^
>                                                              ,
> ../drivers/clk/rockchip/clk-rk3228.c:140:48: note: place parentheses
> around the string literal to silence warning
> PNAME(mux_pll_src_4plls_p)      = { "cpll", "gpll", "hdmiphy" "usb480m" };
>                                                     ^
> 1 warning generated.
> 
> Given the name of the variable and the same variable name in rv1108, it
> seems that this should have been four distinct elements. Fix it up by
> adding the comma as suggested.
> 
> Fixes: 307a2e9ac524 ("clk: rockchip: add clock controller for rk3228")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1123
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---

Looks good to me. I can pick it up for clk-fixes if Heiko agrees.

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

* Re: [PATCH] clk: rockchip: Fix initialization of mux_pll_src_4plls_p
  2020-08-12  7:52 ` Stephen Boyd
@ 2020-08-12 19:23   ` Heiko Stuebner
  0 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2020-08-12 19:23 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Michael Turquette, Nathan Chancellor, linux-clk,
	linux-arm-kernel, linux-rockchip, linux-kernel,
	clang-built-linux

Am Mittwoch, 12. August 2020, 09:52:32 CEST schrieb Stephen Boyd:
> Quoting Nathan Chancellor (2020-08-09 21:40:20)
> > A new warning in Clang points out that the initialization of
> > mux_pll_src_4plls_p appears incorrect:
> > 
> > ../drivers/clk/rockchip/clk-rk3228.c:140:58: warning: suspicious
> > concatenation of string literals in an array initialization; did you
> > mean to separate the elements with a comma? [-Wstring-concatenation]
> > PNAME(mux_pll_src_4plls_p)      = { "cpll", "gpll", "hdmiphy" "usb480m" };
> >                                                               ^
> >                                                              ,
> > ../drivers/clk/rockchip/clk-rk3228.c:140:48: note: place parentheses
> > around the string literal to silence warning
> > PNAME(mux_pll_src_4plls_p)      = { "cpll", "gpll", "hdmiphy" "usb480m" };
> >                                                     ^
> > 1 warning generated.
> > 
> > Given the name of the variable and the same variable name in rv1108, it
> > seems that this should have been four distinct elements. Fix it up by
> > adding the comma as suggested.
> > 
> > Fixes: 307a2e9ac524 ("clk: rockchip: add clock controller for rk3228")
> > Link: https://github.com/ClangBuiltLinux/linux/issues/1123
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> 
> Looks good to me. I can pick it up for clk-fixes if Heiko agrees.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>

@Stephen you can pick this up as suggested


Thanks
Heiko




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

* Re: [PATCH] clk: rockchip: Fix initialization of mux_pll_src_4plls_p
  2020-08-10  4:40 [PATCH] clk: rockchip: Fix initialization of mux_pll_src_4plls_p Nathan Chancellor
  2020-08-12  7:52 ` Stephen Boyd
@ 2020-08-19  3:09 ` Stephen Boyd
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2020-08-19  3:09 UTC (permalink / raw)
  To: Michael Turquette, Nathan Chancellor
  Cc: Heiko Stuebner, linux-clk, linux-arm-kernel, linux-rockchip,
	linux-kernel, clang-built-linux, Nathan Chancellor

Quoting Nathan Chancellor (2020-08-09 21:40:20)
> A new warning in Clang points out that the initialization of
> mux_pll_src_4plls_p appears incorrect:
> 
> ../drivers/clk/rockchip/clk-rk3228.c:140:58: warning: suspicious
> concatenation of string literals in an array initialization; did you
> mean to separate the elements with a comma? [-Wstring-concatenation]
> PNAME(mux_pll_src_4plls_p)      = { "cpll", "gpll", "hdmiphy" "usb480m" };
>                                                               ^
>                                                              ,
> ../drivers/clk/rockchip/clk-rk3228.c:140:48: note: place parentheses
> around the string literal to silence warning
> PNAME(mux_pll_src_4plls_p)      = { "cpll", "gpll", "hdmiphy" "usb480m" };
>                                                     ^
> 1 warning generated.
> 
> Given the name of the variable and the same variable name in rv1108, it
> seems that this should have been four distinct elements. Fix it up by
> adding the comma as suggested.
> 
> Fixes: 307a2e9ac524 ("clk: rockchip: add clock controller for rk3228")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1123
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---

Applied to clk-fixes

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

end of thread, other threads:[~2020-08-19  3:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10  4:40 [PATCH] clk: rockchip: Fix initialization of mux_pll_src_4plls_p Nathan Chancellor
2020-08-12  7:52 ` Stephen Boyd
2020-08-12 19:23   ` Heiko Stuebner
2020-08-19  3:09 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).