mbox series

[0/3] clk: imx: Make all the parent_names arrays be const pointers

Message ID 1544801400-18951-1-git-send-email-abel.vesa@nxp.com (mailing list archive)
Headers show
Series clk: imx: Make all the parent_names arrays be const pointers | expand

Message

Abel Vesa Dec. 14, 2018, 3:30 p.m. UTC
This is mainly to shut up the checkpatch.pl script warnings about the
"static const char *" needing to be "static const char * const".

Abel Vesa (3):
  clk: imx: Make parent_names const pointer in composite-8m
  clk: imx: Make parents const pointer in mux wrappers
  clk: imx8mq: Make parent names arrays const pointers

 drivers/clk/imx/clk-composite-8m.c |   2 +-
 drivers/clk/imx/clk-imx8mq.c       | 194 ++++++++++++++++++-------------------
 drivers/clk/imx/clk.h              |   5 +-
 3 files changed, 101 insertions(+), 100 deletions(-)

Comments

Stephen Boyd Dec. 14, 2018, 9:08 p.m. UTC | #1
Quoting Abel Vesa (2018-12-14 07:30:08)
> This is mainly to shut up the checkpatch.pl script warnings about the
> "static const char *" needing to be "static const char * const".
> 
> Abel Vesa (3):
>   clk: imx: Make parent_names const pointer in composite-8m
>   clk: imx: Make parents const pointer in mux wrappers
>   clk: imx8mq: Make parent names arrays const pointers
> 

I still see warnings though so there seems to be some more work to do.

drivers/clk/imx/clk-imx8mq.c:401:89: warning: passing argument 5 of 'imx_clk_mux2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  clks[IMX8MQ_CLK_GPU_SHADER_SRC] = imx_clk_mux2("gpu_shader_src", base + 0x8200, 24, 3, imx8mq_gpu_shader_sels,  ARRAY_SIZE(imx8mq_gpu_shader_sels));
Abel Vesa Dec. 17, 2018, 11:35 a.m. UTC | #2
On 18-12-14 13:08:37, Stephen Boyd wrote:
> Quoting Abel Vesa (2018-12-14 07:30:08)
> > This is mainly to shut up the checkpatch.pl script warnings about the
> > "static const char *" needing to be "static const char * const".
> > 
> > Abel Vesa (3):
> >   clk: imx: Make parent_names const pointer in composite-8m
> >   clk: imx: Make parents const pointer in mux wrappers
> >   clk: imx8mq: Make parent names arrays const pointers
> > 
> 
> I still see warnings though so there seems to be some more work to do.
> 
> drivers/clk/imx/clk-imx8mq.c:401:89: warning: passing argument 5 of 'imx_clk_mux2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>   clks[IMX8MQ_CLK_GPU_SHADER_SRC] = imx_clk_mux2("gpu_shader_src", base + 0x8200, 24, 3, imx8mq_gpu_shader_sels,  ARRAY_SIZE(imx8mq_gpu_shader_sels));
> 
Hmm, I guess you applied this on top of clk-imx8mq, right ?
This change is against linux-next. The actual problem is the imx_clk_mux2
which looks like this on branch clk-imx8mq:

static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg,  
                u8 shift, u8 width, const char **parents, int num_parents)   

but it looks like this on linux-next (which is exactly the same on clk-next):

static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg,  
                        u8 shift, u8 width, const char * const *parents,     
                        int num_parents)
Stephen Boyd Dec. 17, 2018, 6:40 p.m. UTC | #3
Quoting Abel Vesa (2018-12-17 03:35:40)
> On 18-12-14 13:08:37, Stephen Boyd wrote:
> > Quoting Abel Vesa (2018-12-14 07:30:08)
> > > This is mainly to shut up the checkpatch.pl script warnings about the
> > > "static const char *" needing to be "static const char * const".
> > > 
> > > Abel Vesa (3):
> > >   clk: imx: Make parent_names const pointer in composite-8m
> > >   clk: imx: Make parents const pointer in mux wrappers
> > >   clk: imx8mq: Make parent names arrays const pointers
> > > 
> > 
> > I still see warnings though so there seems to be some more work to do.
> > 
> > drivers/clk/imx/clk-imx8mq.c:401:89: warning: passing argument 5 of 'imx_clk_mux2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> >   clks[IMX8MQ_CLK_GPU_SHADER_SRC] = imx_clk_mux2("gpu_shader_src", base + 0x8200, 24, 3, imx8mq_gpu_shader_sels,  ARRAY_SIZE(imx8mq_gpu_shader_sels));
> > 
> Hmm, I guess you applied this on top of clk-imx8mq, right ?
> This change is against linux-next. The actual problem is the imx_clk_mux2
> which looks like this on branch clk-imx8mq:

Yes. It would be great if you could indicate where patches are
generated. In fact, I see that 'git format-patch' now has an option to
do just this!

	git format-patch --base=commit

> 
> static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg,  
>                 u8 shift, u8 width, const char **parents, int num_parents)   
> 
> but it looks like this on linux-next (which is exactly the same on clk-next):
> 
> static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg,  
>                         u8 shift, u8 width, const char * const *parents,     
>                         int num_parents)                                     

Hrmm ok. I'll have to rejigger things and I probably won't be getting to
it until early next year.
Abel Vesa Dec. 17, 2018, 6:59 p.m. UTC | #4
On 18-12-17 10:40:52, Stephen Boyd wrote:
> Quoting Abel Vesa (2018-12-17 03:35:40)
> > On 18-12-14 13:08:37, Stephen Boyd wrote:
> > > Quoting Abel Vesa (2018-12-14 07:30:08)
> > > > This is mainly to shut up the checkpatch.pl script warnings about the
> > > > "static const char *" needing to be "static const char * const".
> > > > 
> > > > Abel Vesa (3):
> > > >   clk: imx: Make parent_names const pointer in composite-8m
> > > >   clk: imx: Make parents const pointer in mux wrappers
> > > >   clk: imx8mq: Make parent names arrays const pointers
> > > > 
> > > 
> > > I still see warnings though so there seems to be some more work to do.
> > > 
> > > drivers/clk/imx/clk-imx8mq.c:401:89: warning: passing argument 5 of 'imx_clk_mux2' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> > >   clks[IMX8MQ_CLK_GPU_SHADER_SRC] = imx_clk_mux2("gpu_shader_src", base + 0x8200, 24, 3, imx8mq_gpu_shader_sels,  ARRAY_SIZE(imx8mq_gpu_shader_sels));
> > > 
> > Hmm, I guess you applied this on top of clk-imx8mq, right ?
> > This change is against linux-next. The actual problem is the imx_clk_mux2
> > which looks like this on branch clk-imx8mq:
> 
> Yes. It would be great if you could indicate where patches are
> generated. In fact, I see that 'git format-patch' now has an option to
> do just this!
> 
> 	git format-patch --base=commit
> 

Sorry about that. Will do that in the future.

> > 
> > static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg,  
> >                 u8 shift, u8 width, const char **parents, int num_parents)   
> > 
> > but it looks like this on linux-next (which is exactly the same on clk-next):
> > 
> > static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg,  
> >                         u8 shift, u8 width, const char * const *parents,     
> >                         int num_parents)                                     
> 
> Hrmm ok. I'll have to rejigger things and I probably won't be getting to
> it until early next year.
> 

I can rebase it on clk-imx8mq and resend if you want.