* [PATCH] clk: meson-gxbb: switch video clocks mux tables to static
@ 2018-12-04 12:58 Neil Armstrong
2018-12-04 17:43 ` Stephen Boyd
0 siblings, 1 reply; 5+ messages in thread
From: Neil Armstrong @ 2018-12-04 12:58 UTC (permalink / raw)
To: jbrunet; +Cc: linux-amlogic, linux-clk, linux-kernel, Neil Armstrong
Makes the following sparse warnings silent:
drivers/clk/meson/vid-pll-div.c:58:26: warning: symbol '_get_table_val' was not declared. Should it be static?
drivers/clk/meson/gxbb.c:1585:12: warning: symbol 'gxbb_vid_pll_parent_names' was not declared. Should it be static?
drivers/clk/meson/gxbb.c:1620:12: warning: symbol 'gxbb_vclk_parent_names' was not declared. Should it be static?
drivers/clk/meson/gxbb.c:1980:12: warning: symbol 'gxbb_cts_parent_names' was not declared. Should it be static?
drivers/clk/meson/gxbb.c:2036:12: warning: symbol 'gxbb_cts_hdmi_tx_parent_names' was not declared. Should it be static?
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/clk/meson/gxbb.c | 8 ++++----
drivers/clk/meson/vid-pll-div.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index 794f6492a93d..9290465c0589 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -1588,7 +1588,7 @@ static struct clk_regmap gxbb_vid_pll_div = {
},
};
-const char *gxbb_vid_pll_parent_names[] = { "vid_pll_div", "hdmi_pll" };
+static const char * const gxbb_vid_pll_parent_names[] = { "vid_pll_div", "hdmi_pll" };
static struct clk_regmap gxbb_vid_pll_sel = {
.data = &(struct clk_regmap_mux_data){
@@ -1623,7 +1623,7 @@ static struct clk_regmap gxbb_vid_pll = {
},
};
-const char *gxbb_vclk_parent_names[] = {
+static const char * const gxbb_vclk_parent_names[] = {
"vid_pll", "fclk_div4", "fclk_div3", "fclk_div5", "vid_pll",
"fclk_div7", "mpll1",
};
@@ -1983,7 +1983,7 @@ static struct clk_fixed_factor gxbb_vclk2_div12 = {
};
static u32 mux_table_cts_sel[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 };
-const char *gxbb_cts_parent_names[] = {
+static const char * const gxbb_cts_parent_names[] = {
"vclk_div1", "vclk_div2", "vclk_div4", "vclk_div6",
"vclk_div12", "vclk2_div1", "vclk2_div2", "vclk2_div4",
"vclk2_div6", "vclk2_div12"
@@ -2039,7 +2039,7 @@ static struct clk_regmap gxbb_cts_vdac_sel = {
/* TOFIX: add support for cts_tcon */
static u32 mux_table_hdmi_tx_sel[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 };
-const char *gxbb_cts_hdmi_tx_parent_names[] = {
+static const char * const gxbb_cts_hdmi_tx_parent_names[] = {
"vclk_div1", "vclk_div2", "vclk_div4", "vclk_div6",
"vclk_div12", "vclk2_div1", "vclk2_div2", "vclk2_div4",
"vclk2_div6", "vclk2_div12"
diff --git a/drivers/clk/meson/vid-pll-div.c b/drivers/clk/meson/vid-pll-div.c
index b3370ea7beac..88af0e282ea0 100644
--- a/drivers/clk/meson/vid-pll-div.c
+++ b/drivers/clk/meson/vid-pll-div.c
@@ -55,8 +55,8 @@ static const struct vid_pll_div vid_pll_div_table[] = {
#define to_meson_vid_pll_div(_hw) \
container_of(_hw, struct meson_vid_pll_div, hw)
-const struct vid_pll_div *_get_table_val(unsigned int shift_val,
- unsigned int shift_sel)
+static const struct vid_pll_div *_get_table_val(unsigned int shift_val,
+ unsigned int shift_sel)
{
int i;
--
2.19.2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: meson-gxbb: switch video clocks mux tables to static
2018-12-04 12:58 [PATCH] clk: meson-gxbb: switch video clocks mux tables to static Neil Armstrong
@ 2018-12-04 17:43 ` Stephen Boyd
2018-12-04 19:33 ` Neil Armstrong
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2018-12-04 17:43 UTC (permalink / raw)
To: Neil Armstrong, jbrunet
Cc: linux-amlogic, linux-clk, linux-kernel, Neil Armstrong
Quoting Neil Armstrong (2018-12-04 04:58:39)
> Makes the following sparse warnings silent:
> drivers/clk/meson/vid-pll-div.c:58:26: warning: symbol '_get_table_val' was not declared. Should it be static?
> drivers/clk/meson/gxbb.c:1585:12: warning: symbol 'gxbb_vid_pll_parent_names' was not declared. Should it be static?
> drivers/clk/meson/gxbb.c:1620:12: warning: symbol 'gxbb_vclk_parent_names' was not declared. Should it be static?
> drivers/clk/meson/gxbb.c:1980:12: warning: symbol 'gxbb_cts_parent_names' was not declared. Should it be static?
> drivers/clk/meson/gxbb.c:2036:12: warning: symbol 'gxbb_cts_hdmi_tx_parent_names' was not declared. Should it be static?
I fixed all of these already in the patch I sent you.
> @@ -1983,7 +1983,7 @@ static struct clk_fixed_factor gxbb_vclk2_div12 = {
> };
>
> static u32 mux_table_cts_sel[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 };
I was talking about this mux_table_cts_sel array. Can this be const?
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: meson-gxbb: switch video clocks mux tables to static
2018-12-04 17:43 ` Stephen Boyd
@ 2018-12-04 19:33 ` Neil Armstrong
2018-12-04 20:05 ` Jerome Brunet
0 siblings, 1 reply; 5+ messages in thread
From: Neil Armstrong @ 2018-12-04 19:33 UTC (permalink / raw)
To: Stephen Boyd, jbrunet; +Cc: linux-amlogic, linux-clk, linux-kernel
Hi Stephen,
Le 04/12/2018 18:43, Stephen Boyd a écrit :
> Quoting Neil Armstrong (2018-12-04 04:58:39)
>> Makes the following sparse warnings silent:
>> drivers/clk/meson/vid-pll-div.c:58:26: warning: symbol '_get_table_val' was not declared. Should it be static?
>> drivers/clk/meson/gxbb.c:1585:12: warning: symbol 'gxbb_vid_pll_parent_names' was not declared. Should it be static?
>> drivers/clk/meson/gxbb.c:1620:12: warning: symbol 'gxbb_vclk_parent_names' was not declared. Should it be static?
>> drivers/clk/meson/gxbb.c:1980:12: warning: symbol 'gxbb_cts_parent_names' was not declared. Should it be static?
>> drivers/clk/meson/gxbb.c:2036:12: warning: symbol 'gxbb_cts_hdmi_tx_parent_names' was not declared. Should it be static?
>
> I fixed all of these already in the patch I sent you.
Sorry I misunderstood...
>
>> @@ -1983,7 +1983,7 @@ static struct clk_fixed_factor gxbb_vclk2_div12 = {
>> };
>>
>> static u32 mux_table_cts_sel[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 };
>
> I was talking about this mux_table_cts_sel array. Can this be const?
>
Other mux tables aren't const, Jerome so you see a reason why they aren't const ?
Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: meson-gxbb: switch video clocks mux tables to static
2018-12-04 19:33 ` Neil Armstrong
@ 2018-12-04 20:05 ` Jerome Brunet
2018-12-04 20:48 ` Stephen Boyd
0 siblings, 1 reply; 5+ messages in thread
From: Jerome Brunet @ 2018-12-04 20:05 UTC (permalink / raw)
To: Neil Armstrong, Stephen Boyd; +Cc: linux-amlogic, linux-clk, linux-kernel
On Tue, 2018-12-04 at 20:33 +0100, Neil Armstrong wrote:
> Hi Stephen,
>
> Le 04/12/2018 18:43, Stephen Boyd a écrit :
> > Quoting Neil Armstrong (2018-12-04 04:58:39)
> > > Makes the following sparse warnings silent:
> > > drivers/clk/meson/vid-pll-div.c:58:26: warning: symbol '_get_table_val'
> > > was not declared. Should it be static?
> > > drivers/clk/meson/gxbb.c:1585:12: warning: symbol
> > > 'gxbb_vid_pll_parent_names' was not declared. Should it be static?
> > > drivers/clk/meson/gxbb.c:1620:12: warning: symbol
> > > 'gxbb_vclk_parent_names' was not declared. Should it be static?
> > > drivers/clk/meson/gxbb.c:1980:12: warning: symbol
> > > 'gxbb_cts_parent_names' was not declared. Should it be static?
> > > drivers/clk/meson/gxbb.c:2036:12: warning: symbol
> > > 'gxbb_cts_hdmi_tx_parent_names' was not declared. Should it be static?
> >
> > I fixed all of these already in the patch I sent you.
>
> Sorry I misunderstood...
>
>
> > > @@ -1983,7 +1983,7 @@ static struct clk_fixed_factor gxbb_vclk2_div12 =
> > > {
> > > };
> > >
> > > static u32 mux_table_cts_sel[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 };
> >
> > I was talking about this mux_table_cts_sel array. Can this be const?
> >
>
> Other mux tables aren't const, Jerome so you see a reason why they aren't
> const ?
I'm surpised we missed that. The PLL params tables of amlogic are all 'static
const' but all the mux tables are just 'static' , humm
[...] 5 min later [...]
Actually the table field of clk_mux is not const, so giving it a const table
would produce a warning about discarding const qualifier
I guess there should no problem adding const to the table field of struct
clk_mux. What do you think Stephen ?
>
> Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: meson-gxbb: switch video clocks mux tables to static
2018-12-04 20:05 ` Jerome Brunet
@ 2018-12-04 20:48 ` Stephen Boyd
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2018-12-04 20:48 UTC (permalink / raw)
To: Jerome Brunet, Neil Armstrong; +Cc: linux-amlogic, linux-clk, linux-kernel
Quoting Jerome Brunet (2018-12-04 12:05:02)
> On Tue, 2018-12-04 at 20:33 +0100, Neil Armstrong wrote:
> > Le 04/12/2018 18:43, Stephen Boyd a écrit :
> > > Quoting Neil Armstrong (2018-12-04 04:58:39)
> > > > @@ -1983,7 +1983,7 @@ static struct clk_fixed_factor gxbb_vclk2_div12 =
> > > > {
> > > > };
> > > >
> > > > static u32 mux_table_cts_sel[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 };
> > >
> > > I was talking about this mux_table_cts_sel array. Can this be const?
> > >
> >
> > Other mux tables aren't const, Jerome so you see a reason why they aren't
> > const ?
>
> I'm surpised we missed that. The PLL params tables of amlogic are all 'static
> const' but all the mux tables are just 'static' , humm
>
> [...] 5 min later [...]
>
> Actually the table field of clk_mux is not const, so giving it a const table
> would produce a warning about discarding const qualifier
>
> I guess there should no problem adding const to the table field of struct
> clk_mux. What do you think Stephen ?
Yes it would need to be marked const in the struct clk_mux as well. Go
for it to move more things to the RO section.
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-12-04 20:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 12:58 [PATCH] clk: meson-gxbb: switch video clocks mux tables to static Neil Armstrong
2018-12-04 17:43 ` Stephen Boyd
2018-12-04 19:33 ` Neil Armstrong
2018-12-04 20:05 ` Jerome Brunet
2018-12-04 20:48 ` 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).