diff mbox

[4/8] clk: tegra: Fix duplicate const for parent names

Message ID 1428499339-29569-5-git-send-email-k.kozlowski@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Krzysztof Kozlowski April 8, 2015, 1:22 p.m. UTC
Replace duplicated const keyword for 'emc_parent_clk_names' with proper
array of const pointers to const strings.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 drivers/clk/tegra/clk-emc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thierry Reding April 9, 2015, 10 a.m. UTC | #1
On Wed, Apr 08, 2015 at 03:22:15PM +0200, Krzysztof Kozlowski wrote:
> Replace duplicated const keyword for 'emc_parent_clk_names' with proper
> array of const pointers to const strings.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  drivers/clk/tegra/clk-emc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This would probably better go in via the Tegra tree since the patch that
contains this has only made it to linux-next.

Stephen, Mike, any objections to me taking this?

Thierry

> diff --git a/drivers/clk/tegra/clk-emc.c b/drivers/clk/tegra/clk-emc.c
> index 615da43a508d..637798c3cc59 100644
> --- a/drivers/clk/tegra/clk-emc.c
> +++ b/drivers/clk/tegra/clk-emc.c
> @@ -45,7 +45,7 @@
>  #define CLK_SOURCE_EMC_EMC_2X_CLK_SRC(x) (((x) & CLK_SOURCE_EMC_EMC_2X_CLK_SRC_MASK) << \
>  					  CLK_SOURCE_EMC_EMC_2X_CLK_SRC_SHIFT)
>  
> -static const char const *emc_parent_clk_names[] = {
> +static const char * const emc_parent_clk_names[] = {
>  	"pll_m", "pll_c", "pll_p", "clk_m", "pll_m_ud",
>  	"pll_c2", "pll_c3", "pll_c_ud"
>  };
> -- 
> 1.9.1
>
Krzysztof Kozlowski April 9, 2015, 10:07 a.m. UTC | #2
2015-04-09 12:00 GMT+02:00 Thierry Reding <thierry.reding@gmail.com>:
> On Wed, Apr 08, 2015 at 03:22:15PM +0200, Krzysztof Kozlowski wrote:
>> Replace duplicated const keyword for 'emc_parent_clk_names' with proper
>> array of const pointers to const strings.
>>
>> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>> ---
>>  drivers/clk/tegra/clk-emc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> This would probably better go in via the Tegra tree since the patch that
> contains this has only made it to linux-next.
>
> Stephen, Mike, any objections to me taking this?

Applying this without the change for const-ness of parent_names (patch
by Sascha Hauer sent before mine [1]) would introduce a warning -
assign of const to non-const. Any idea to solve it? Immutable branch?

[1] http://marc.info/?i=1427825817-26773-2-git-send-email-s.hauer%40pengutronix.de

Best regards,
Krzysztof
Thierry Reding April 9, 2015, 10:19 a.m. UTC | #3
On Thu, Apr 09, 2015 at 12:07:59PM +0200, Krzysztof Kozlowski wrote:
> 2015-04-09 12:00 GMT+02:00 Thierry Reding <thierry.reding@gmail.com>:
> > On Wed, Apr 08, 2015 at 03:22:15PM +0200, Krzysztof Kozlowski wrote:
> >> Replace duplicated const keyword for 'emc_parent_clk_names' with proper
> >> array of const pointers to const strings.
> >>
> >> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> >> ---
> >>  drivers/clk/tegra/clk-emc.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > This would probably better go in via the Tegra tree since the patch that
> > contains this has only made it to linux-next.
> >
> > Stephen, Mike, any objections to me taking this?
> 
> Applying this without the change for const-ness of parent_names (patch
> by Sascha Hauer sent before mine [1]) would introduce a warning -
> assign of const to non-const. Any idea to solve it? Immutable branch?

Right, I had missed that. Immutable branch would work, though perhaps
it'd be easier to just defer this until after v4.1-rc1. The warning
shouldn't happen if we leave out this single patch and apply it later
on, right?

Alternatively the whole series could be deferred until after v4.1-rc1.

Thierry
Krzysztof Kozlowski April 9, 2015, 10:33 a.m. UTC | #4
2015-04-09 12:19 GMT+02:00 Thierry Reding <thierry.reding@gmail.com>:
> On Thu, Apr 09, 2015 at 12:07:59PM +0200, Krzysztof Kozlowski wrote:
>> 2015-04-09 12:00 GMT+02:00 Thierry Reding <thierry.reding@gmail.com>:
>> > On Wed, Apr 08, 2015 at 03:22:15PM +0200, Krzysztof Kozlowski wrote:
>> >> Replace duplicated const keyword for 'emc_parent_clk_names' with proper
>> >> array of const pointers to const strings.
>> >>
>> >> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>> >> ---
>> >>  drivers/clk/tegra/clk-emc.c | 2 +-
>> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > This would probably better go in via the Tegra tree since the patch that
>> > contains this has only made it to linux-next.
>> >
>> > Stephen, Mike, any objections to me taking this?
>>
>> Applying this without the change for const-ness of parent_names (patch
>> by Sascha Hauer sent before mine [1]) would introduce a warning -
>> assign of const to non-const. Any idea to solve it? Immutable branch?
>
> Right, I had missed that. Immutable branch would work, though perhaps
> it'd be easier to just defer this until after v4.1-rc1. The warning
> shouldn't happen if we leave out this single patch and apply it later
> on, right?

That would be fine with me. I think it would better to apply patches
now if they are applicable.

Best regards,
Krzysztof
Stephen Boyd April 9, 2015, 3:28 p.m. UTC | #5
On 04/09, Thierry Reding wrote:
> On Thu, Apr 09, 2015 at 12:07:59PM +0200, Krzysztof Kozlowski wrote:
> > 2015-04-09 12:00 GMT+02:00 Thierry Reding <thierry.reding@gmail.com>:
> > > On Wed, Apr 08, 2015 at 03:22:15PM +0200, Krzysztof Kozlowski wrote:
> > >> Replace duplicated const keyword for 'emc_parent_clk_names' with proper
> > >> array of const pointers to const strings.
> > >>
> > >> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > >> ---
> > >>  drivers/clk/tegra/clk-emc.c | 2 +-
> > >>  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > This would probably better go in via the Tegra tree since the patch that
> > > contains this has only made it to linux-next.
> > >
> > > Stephen, Mike, any objections to me taking this?
> > 
> > Applying this without the change for const-ness of parent_names (patch
> > by Sascha Hauer sent before mine [1]) would introduce a warning -
> > assign of const to non-const. Any idea to solve it? Immutable branch?
> 
> Right, I had missed that. Immutable branch would work, though perhaps
> it'd be easier to just defer this until after v4.1-rc1. The warning
> shouldn't happen if we leave out this single patch and apply it later
> on, right?
> 
> Alternatively the whole series could be deferred until after v4.1-rc1.
> 

Yeah I don't really care to make an immutable branch for this
cleanup series. If everyone is ok with waiting until after -rc1
we can apply the Tegra patch then (or you can and we'll get it
through a pull later). We should be able to apply the parts that
go through clk tree though.
diff mbox

Patch

diff --git a/drivers/clk/tegra/clk-emc.c b/drivers/clk/tegra/clk-emc.c
index 615da43a508d..637798c3cc59 100644
--- a/drivers/clk/tegra/clk-emc.c
+++ b/drivers/clk/tegra/clk-emc.c
@@ -45,7 +45,7 @@ 
 #define CLK_SOURCE_EMC_EMC_2X_CLK_SRC(x) (((x) & CLK_SOURCE_EMC_EMC_2X_CLK_SRC_MASK) << \
 					  CLK_SOURCE_EMC_EMC_2X_CLK_SRC_SHIFT)
 
-static const char const *emc_parent_clk_names[] = {
+static const char * const emc_parent_clk_names[] = {
 	"pll_m", "pll_c", "pll_p", "clk_m", "pll_m_ud",
 	"pll_c2", "pll_c3", "pll_c_ud"
 };