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

Jonathan Neuschäfer posted 7 patches 4 years, 4 months ago
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(-)
[PATCH v2 0/7] clk: Declare mux tables as const u32[]
Posted by Jonathan Neuschäfer 4 years, 4 months ago
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

Re: [PATCH v2 0/7] clk: Declare mux tables as const u32[]
Posted by Stephen Boyd 4 years, 4 months ago
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.