public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [GIT PULL] sirf clk update for 3.16
@ 2014-05-12 14:45 Barry Song
  2014-05-15  6:01 ` Mike Turquette
  0 siblings, 1 reply; 4+ messages in thread
From: Barry Song @ 2014-05-12 14:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mike,

can you pull the below update for 3.16? it cleanups the sirf clk codes
to fix some minor checkpatch issues according to key customer's
requirement.


The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:

  Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux.git
tags/clk-sirf-for-3.16

for you to fetch changes up to d7ba5ba84c169e369dd3480f3968044f2f8946a8:

  clk: sirf: fix a bundle of checkpatch issues (2014-05-12 22:32:05 +0800)

----------------------------------------------------------------
clk: sirf: update for 3.16

fix minor checkpatch issues according to key customers' requirement.

----------------------------------------------------------------
Bin Shi (1):
      clk: sirf: fix a bundle of checkpatch issues

 drivers/clk/sirf/clk-atlas6.c |   12 ++++++------
 drivers/clk/sirf/clk-common.c |   22 ++++++++++++----------
 drivers/clk/sirf/clk-prima2.c |   10 +++++-----
 3 files changed, 23 insertions(+), 21 deletions(-)

-barry

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

* [GIT PULL] sirf clk update for 3.16
  2014-05-12 14:45 [GIT PULL] sirf clk update for 3.16 Barry Song
@ 2014-05-15  6:01 ` Mike Turquette
  2014-05-18 12:50   ` Barry Song
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Turquette @ 2014-05-15  6:01 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Barry Song (2014-05-12 07:45:00)
> Hi Mike,
> 
> can you pull the below update for 3.16? it cleanups the sirf clk codes
> to fix some minor checkpatch issues according to key customer's
> requirement.
> 
> 
> The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:
> 
>   Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux.git
> tags/clk-sirf-for-3.16

Hi Barry,

I get the following warnings when pulling this tag onto the clk-next
branch:

In file included from drivers/clk/sirf/clk-prima2.c:20:0:
drivers/clk/sirf/clk-common.c:199:2: warning: initialization discards ?const? qualifier from pointer target type [enabled by default]
  .parent_names = pll_clk_parents,
  ^
  ... repeats a for every .parent_names instance ...

In file included from drivers/clk/sirf/clk-atlas6.c:20:0:
drivers/clk/sirf/clk-common.c:199:2: warning: initialization discards ?const? qualifier from pointer target type [enabled by default]
  .parent_names = pll_clk_parents,
  ^
  ... repeats a for every .parent_names instance ...

Can you fix up and resubmit?

Regards,
Mike

> 
> for you to fetch changes up to d7ba5ba84c169e369dd3480f3968044f2f8946a8:
> 
>   clk: sirf: fix a bundle of checkpatch issues (2014-05-12 22:32:05 +0800)
> 
> ----------------------------------------------------------------
> clk: sirf: update for 3.16
> 
> fix minor checkpatch issues according to key customers' requirement.
> 
> ----------------------------------------------------------------
> Bin Shi (1):
>       clk: sirf: fix a bundle of checkpatch issues
> 
>  drivers/clk/sirf/clk-atlas6.c |   12 ++++++------
>  drivers/clk/sirf/clk-common.c |   22 ++++++++++++----------
>  drivers/clk/sirf/clk-prima2.c |   10 +++++-----
>  3 files changed, 23 insertions(+), 21 deletions(-)
> 
> -barry

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

* [GIT PULL] sirf clk update for 3.16
  2014-05-15  6:01 ` Mike Turquette
@ 2014-05-18 12:50   ` Barry Song
  2014-06-02 22:10     ` Mike Turquette
  0 siblings, 1 reply; 4+ messages in thread
From: Barry Song @ 2014-05-18 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

2014-05-15 14:01 GMT+08:00 Mike Turquette <mturquette@linaro.org>:
> Quoting Barry Song (2014-05-12 07:45:00)
>> Hi Mike,
>>
>> can you pull the below update for 3.16? it cleanups the sirf clk codes
>> to fix some minor checkpatch issues according to key customer's
>> requirement.
>>
>>
>> The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:
>>
>>   Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)
>>
>> are available in the git repository at:
>>
>>   git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux.git
>> tags/clk-sirf-for-3.16
>
> Hi Barry,
>
> I get the following warnings when pulling this tag onto the clk-next
> branch:
>
> In file included from drivers/clk/sirf/clk-prima2.c:20:0:
> drivers/clk/sirf/clk-common.c:199:2: warning: initialization discards ?const? qualifier from pointer target type [enabled by default]
>   .parent_names = pll_clk_parents,
>   ^
>   ... repeats a for every .parent_names instance ...
>
> In file included from drivers/clk/sirf/clk-atlas6.c:20:0:
> drivers/clk/sirf/clk-common.c:199:2: warning: initialization discards ?const? qualifier from pointer target type [enabled by default]
>   .parent_names = pll_clk_parents,
>   ^
>   ... repeats a for every .parent_names instance ...
>
> Can you fix up and resubmit?
>

hi Mike,
this might mean we need a fix in clk core. we moved to "const char *
const" for clk parents
by:
137 -static const char *pll_clk_parents[] = {
138 +static const char * const pll_clk_parents[] = {
...
repeated for every clk_parent.
...

to fix checkpatch issues like:
#287: FILE: clk-common.c:287:
+static const char *dmn_clk_parents[] = {

WARNING: static const char * array should probably be static const char * const

but in clk_init_data, parent_names are "const char **"
const char              **parent_names;

if we don't change the parent_names of clk_init_data structure, the
only thing we can do to fix "warning: initialization discards ?const?
qualifier from pointer target type" is doing things like:

 static struct clk_init_data clk_spi1_init = {
        .name = "spi1",
        .ops = &ios_ops,
-       .parent_names = std_clk_io_parents,
+       .parent_names = (const char **)std_clk_io_parents,
        .num_parents = ARRAY_SIZE(std_clk_io_parents),
 };

but this looks not too right. what is your opinion? i want to send a
fix for this issue by:

commit ef10a461aaa5db647a5e8d4d1f43659bab2ae9e1
Author: Barry Song <Baohua.Song@csr.com>
Date:   Sun May 18 20:47:29 2014 +0800

    clk: move parent_names of clk_init_data to "const char * const *"

    Signed-off-by: Barry Song ...

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 5119174..f919806 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -188,7 +188,7 @@ struct clk_ops {
 struct clk_init_data {
        const char              *name;
        const struct clk_ops    *ops;
-       const char              **parent_names;
+       const char * const      *parent_names;
        u8                      num_parents;
        unsigned long           flags;
 };


> Regards,
> Mike
>

-barry

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

* [GIT PULL] sirf clk update for 3.16
  2014-05-18 12:50   ` Barry Song
@ 2014-06-02 22:10     ` Mike Turquette
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Turquette @ 2014-06-02 22:10 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Barry Song (2014-05-18 05:50:40)
> 2014-05-15 14:01 GMT+08:00 Mike Turquette <mturquette@linaro.org>:
> > Quoting Barry Song (2014-05-12 07:45:00)
> >> Hi Mike,
> >>
> >> can you pull the below update for 3.16? it cleanups the sirf clk codes
> >> to fix some minor checkpatch issues according to key customer's
> >> requirement.
> >>
> >>
> >> The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:
> >>
> >>   Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)
> >>
> >> are available in the git repository at:
> >>
> >>   git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux.git
> >> tags/clk-sirf-for-3.16
> >
> > Hi Barry,
> >
> > I get the following warnings when pulling this tag onto the clk-next
> > branch:
> >
> > In file included from drivers/clk/sirf/clk-prima2.c:20:0:
> > drivers/clk/sirf/clk-common.c:199:2: warning: initialization discards ?const? qualifier from pointer target type [enabled by default]
> >   .parent_names = pll_clk_parents,
> >   ^
> >   ... repeats a for every .parent_names instance ...
> >
> > In file included from drivers/clk/sirf/clk-atlas6.c:20:0:
> > drivers/clk/sirf/clk-common.c:199:2: warning: initialization discards ?const? qualifier from pointer target type [enabled by default]
> >   .parent_names = pll_clk_parents,
> >   ^
> >   ... repeats a for every .parent_names instance ...
> >
> > Can you fix up and resubmit?
> >
> 
> hi Mike,
> this might mean we need a fix in clk core. we moved to "const char *
> const" for clk parents
> by:
> 137 -static const char *pll_clk_parents[] = {
> 138 +static const char * const pll_clk_parents[] = {
> ...
> repeated for every clk_parent.
> ...
> 
> to fix checkpatch issues like:
> #287: FILE: clk-common.c:287:
> +static const char *dmn_clk_parents[] = {
> 
> WARNING: static const char * array should probably be static const char * const
> 
> but in clk_init_data, parent_names are "const char **"
> const char              **parent_names;
> 
> if we don't change the parent_names of clk_init_data structure, the
> only thing we can do to fix "warning: initialization discards ?const?
> qualifier from pointer target type" is doing things like:
> 
>  static struct clk_init_data clk_spi1_init = {
>         .name = "spi1",
>         .ops = &ios_ops,
> -       .parent_names = std_clk_io_parents,
> +       .parent_names = (const char **)std_clk_io_parents,
>         .num_parents = ARRAY_SIZE(std_clk_io_parents),
>  };
> 
> but this looks not too right. what is your opinion? i want to send a
> fix for this issue by:
> 
> commit ef10a461aaa5db647a5e8d4d1f43659bab2ae9e1
> Author: Barry Song <Baohua.Song@csr.com>
> Date:   Sun May 18 20:47:29 2014 +0800
> 
>     clk: move parent_names of clk_init_data to "const char * const *"
> 
>     Signed-off-by: Barry Song ...
> 
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index 5119174..f919806 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -188,7 +188,7 @@ struct clk_ops {
>  struct clk_init_data {
>         const char              *name;
>         const struct clk_ops    *ops;
> -       const char              **parent_names;
> +       const char * const      *parent_names;

Such a fix throws the following warning:

| drivers/clk/clk.c: In function ?__clk_register?:
drivers/clk/clk.c|1966 col 20| warning: assignment discards ?const? qualifier from pointer target type [enabled by default]
||   clk->parent_names = hw->init->parent_names;
||                     ^

I haven't really taken the time to think about this one. Feel free to
submit a fix, otherwise I'll take a good look at it after 3.16-rc1.

Regards,
Mike

>         u8                      num_parents;
>         unsigned long           flags;
>  };
> 
> 
> > Regards,
> > Mike
> >
> 
> -barry

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

end of thread, other threads:[~2014-06-02 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 14:45 [GIT PULL] sirf clk update for 3.16 Barry Song
2014-05-15  6:01 ` Mike Turquette
2014-05-18 12:50   ` Barry Song
2014-06-02 22:10     ` Mike Turquette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox