mbox series

[v2,0/7] clk: Declare mux tables as const u32[]

Message ID 20220205103613.1216218-1-j.neuschaefer@gmx.net (mailing list archive)
Headers show
Series clk: Declare mux tables as const u32[] | expand

Message

J. Neuschäfer Feb. 5, 2022, 10:36 a.m. UTC
I noticed that the 'table' parameter to clk_register_mux_table is never
used for modifying the table elements, and so it can be declared const.

In version 2 I'm addressing two warnings in the clk-lpc18xx-cgu driver
that I previously missed.

Jonathan Neuschäfer (7):
  clk: nxp: Remove unused variable
  clk: nxp: Declare mux table parameter as const u32 *
  clk: mux: Declare u32 *table parameter as const
  clk: hisilicon: Remove unnecessary cast of mux table to u32 *
  clk: mmp: Declare mux tables as const u32[]
  clk: qcom: Declare mux table as const u32[]
  clk: pistachio: Declare mux table as const u32[]

 drivers/clk/clk-mux.c                 | 10 +++++-----
 drivers/clk/hisilicon/clk.c           |  2 +-
 drivers/clk/mmp/clk-of-mmp2.c         |  4 ++--
 drivers/clk/nxp/clk-lpc18xx-cgu.c     |  5 ++---
 drivers/clk/pistachio/clk-pistachio.c |  2 +-
 drivers/clk/qcom/kpss-xcc.c           |  2 +-
 include/linux/clk-provider.h          | 12 ++++++------
 7 files changed, 18 insertions(+), 19 deletions(-)

--
2.34.1

Comments

Stephen Boyd Feb. 26, 2022, 1 a.m. UTC | #1
Quoting Jonathan Neuschäfer (2022-02-05 02:36:06)
> I noticed that the 'table' parameter to clk_register_mux_table is never
> used for modifying the table elements, and so it can be declared const.
> 
> In version 2 I'm addressing two warnings in the clk-lpc18xx-cgu driver
> that I previously missed.

The format of these patches deeply confused my scripts that use git
interpret-trailer. I fixed it now, hopefully it keeps working. In the
future, please don't add more triple dash '---' sections to the patch.
It looks like those extra sections for the changelog messed everything
up. Or there's a new bug in interpret-trailers.  Either way,
interpret-trailers was adding tags after the entire patch contents
because I think it looks for the last triple dash instead of the first
triple dash. Not sure why it's done that way. I resorted to
reconstructing the patch after splitting it with mailinfo.
J. Neuschäfer Feb. 26, 2022, 12:40 p.m. UTC | #2
On Fri, Feb 25, 2022 at 05:00:31PM -0800, Stephen Boyd wrote:
> Quoting Jonathan Neuschäfer (2022-02-05 02:36:06)
> > I noticed that the 'table' parameter to clk_register_mux_table is never
> > used for modifying the table elements, and so it can be declared const.
> > 
> > In version 2 I'm addressing two warnings in the clk-lpc18xx-cgu driver
> > that I previously missed.
> 
> The format of these patches deeply confused my scripts that use git
> interpret-trailer. I fixed it now, hopefully it keeps working. In the
> future, please don't add more triple dash '---' sections to the patch.
> It looks like those extra sections for the changelog messed everything
> up. Or there's a new bug in interpret-trailers.  Either way,
> interpret-trailers was adding tags after the entire patch contents
> because I think it looks for the last triple dash instead of the first
> triple dash. Not sure why it's done that way. I resorted to
> reconstructing the patch after splitting it with mailinfo.

Hmm, sorry about that.

I've used this format for a while, because it conveniently lets me
keep my remarks in a git commit (rather than a patch file), until I use
git format-patch to generate the final patch file.

I'm not very familiar with git interpret-trailers, but git 2.34.1
doesn't seem to get confused on my patches (or I didn't pass the right
options to cause it to happen).


Jonathan
Stephen Boyd March 12, 2022, 2:33 a.m. UTC | #3
Quoting Jonathan Neuschäfer (2022-02-26 04:40:19)
> On Fri, Feb 25, 2022 at 05:00:31PM -0800, Stephen Boyd wrote:
> > Quoting Jonathan Neuschäfer (2022-02-05 02:36:06)
> > > I noticed that the 'table' parameter to clk_register_mux_table is never
> > > used for modifying the table elements, and so it can be declared const.
> > > 
> > > In version 2 I'm addressing two warnings in the clk-lpc18xx-cgu driver
> > > that I previously missed.
> > 
> > The format of these patches deeply confused my scripts that use git
> > interpret-trailer. I fixed it now, hopefully it keeps working. In the
> > future, please don't add more triple dash '---' sections to the patch.
> > It looks like those extra sections for the changelog messed everything
> > up. Or there's a new bug in interpret-trailers.  Either way,
> > interpret-trailers was adding tags after the entire patch contents
> > because I think it looks for the last triple dash instead of the first
> > triple dash. Not sure why it's done that way. I resorted to
> > reconstructing the patch after splitting it with mailinfo.
> 
> Hmm, sorry about that.
> 
> I've used this format for a while, because it conveniently lets me
> keep my remarks in a git commit (rather than a patch file), until I use
> git format-patch to generate the final patch file.
> 
> I'm not very familiar with git interpret-trailers, but git 2.34.1
> doesn't seem to get confused on my patches (or I didn't pass the right
> options to cause it to happen).
> 

It's possible it's a git bug. No worries!