mbox series

[0/3] arm_scmi: Constify ops pointers in struct scmi_handle

Message ID 20200906230452.33410-1-rikard.falkeborn@gmail.com
Headers show
Series arm_scmi: Constify ops pointers in struct scmi_handle | expand

Message

Rikard Falkeborn Sept. 6, 2020, 11:04 p.m. UTC
A small patch series aiming to constify static scmi_*_ops structs in
drivers/firmware/arm_scmi. Since these are not modified, constify them
to allow the compiler to put them in read-only memory.

Rikard Falkeborn (3):
  cpufreq: arm_scmi: Constify scmi_perf_ops pointers
  firmware: arm_scmi: Constify ops pointers in scmi_handle
  firmware: arm_scmi: Constify static scmi-ops

 drivers/cpufreq/scmi-cpufreq.c      |  6 +++---
 drivers/firmware/arm_scmi/clock.c   |  2 +-
 drivers/firmware/arm_scmi/common.h  |  2 +-
 drivers/firmware/arm_scmi/mailbox.c |  2 +-
 drivers/firmware/arm_scmi/notify.c  |  2 +-
 drivers/firmware/arm_scmi/perf.c    |  2 +-
 drivers/firmware/arm_scmi/power.c   |  2 +-
 drivers/firmware/arm_scmi/reset.c   |  2 +-
 drivers/firmware/arm_scmi/sensors.c |  2 +-
 drivers/firmware/arm_scmi/smc.c     |  2 +-
 include/linux/scmi_protocol.h       | 12 ++++++------
 11 files changed, 18 insertions(+), 18 deletions(-)

Comments

Sudeep Holla Sept. 7, 2020, 10:22 a.m. UTC | #1
Hi Viresh,

On Mon, Sep 07, 2020 at 01:04:50AM +0200, Rikard Falkeborn wrote:
> The perf_ops are not modified through this pointer. Make them const to
> indicate that. This is in preparation to make the scmi-ops pointers in
> scmi_handle const.
>

Your ack needed to take this as series via {arm-,}soc
Sudeep Holla Sept. 7, 2020, 10:44 a.m. UTC | #2
On Mon, Sep 07, 2020 at 03:55:51PM +0530, Viresh Kumar wrote:
> On 07-09-20, 11:22, Sudeep Holla wrote:
> > Hi Viresh,
> >
> > On Mon, Sep 07, 2020 at 01:04:50AM +0200, Rikard Falkeborn wrote:
> > > The perf_ops are not modified through this pointer. Make them const to
> > > indicate that. This is in preparation to make the scmi-ops pointers in
> > > scmi_handle const.
> > >
> >
> > Your ack needed to take this as series via {arm-,}soc
>
> Can I just pick the first patch and you do the rest ? Will it result
> in any warnings at either end ?
>

Initially I thought out suggesting the same, but then I realised(not
checked though), without this change in arm-soc the scmi-cpufreq driver
might produce warnings as the const value gets assigned to non const.
No ?

--
Regards,
Sudeep