Skip to contentSkip to conversation

clk: rockchip: Fix initialization of mux_pll_src_4plls_p

PATCH Applied Nathan Chancellor 3 participants 4 messages Aug 10, 2020 – Aug 19, 2020

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

PATCH 1/1 clk: rockchip: Fix initialization of mux_pll_src_4plls_p

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")
---
 drivers/clk/rockchip/clk-rk3228.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/rockchip/clk-rk3228.c +1 -1
index d7243c09cc84..47d6482dda9d 100644
@@ -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" };
Signature · 1 line
2.28.0
maintainer
#1 lore raw

Quoting Nathan Chancellor (2020-08-09 21:40:20)

Quoted 15 lines

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.

Quoted 8 lines

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")

---

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

maintainer Reviewed-by
#2 lore raw

Am Mittwoch, 12. August 2020, 09:52:32 CEST schrieb Stephen Boyd:

Quoted 20 lines

Quoting Nathan Chancellor (2020-08-09 21:40:20)

Quoted 19 lines

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.

Quoted 6 lines
Quoted 4 lines
Fixes 307a2e9ac524 ("clk: rockchip: add clock controller for rk3228")

---

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

@Stephen you can pick this up as suggested

Thanks
Heiko

maintainer Applied
#3 lore raw
In reply to Nathan Chancellor

Quoting Nathan Chancellor (2020-08-09 21:40:20)

Quoted 15 lines

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.

Quoted 8 lines

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")

---

Applied to clk-fixes