[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPdUWz8DkYp_Xooy@pluto>
Date: Tue, 21 Oct 2025 10:37:31 +0100
From: Cristian Marussi <cristian.marussi@....com>
To: Jonathan Cameron <jonathan.cameron@...wei.com>
Cc: Cristian Marussi <cristian.marussi@....com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
arm-scmi@...r.kernel.org, sudeep.holla@....com,
james.quinlan@...adcom.com, f.fainelli@...il.com,
vincent.guittot@...aro.org, etienne.carriere@...com,
peng.fan@....nxp.com, michal.simek@....com, quic_sibis@...cinc.com,
dan.carpenter@...aro.org, d-gole@...com, souvik.chakravarty@....com
Subject: Re: [PATCH 03/10] firmware: arm_scmi: Allow protocols to register
for notifications
On Fri, Oct 17, 2025 at 04:10:14PM +0100, Jonathan Cameron wrote:
> On Thu, 25 Sep 2025 21:35:47 +0100
> Cristian Marussi <cristian.marussi@....com> wrote:
>
> > Allow protocols themselves to register for their own notifications and
> > providing their own notifier callbacks. While at that, allow for a protocol
> > to register events with compilation-time unknown report/event sizes: such
> > events will use the maximum transport size.
> >
> > Signed-off-by: Cristian Marussi <cristian.marussi@....com>
> Hi Cristian,
>
Hi,
> A few drive by comments...
>
> > diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c
> > index 78e9e27dc9ec..3e623c14745d 100644
> > --- a/drivers/firmware/arm_scmi/notify.c
> > +++ b/drivers/firmware/arm_scmi/notify.c
> > @@ -593,7 +593,12 @@ int scmi_notify(const struct scmi_handle *handle, u8 proto_id, u8 evt_id,
> > if (!r_evt)
> > return -EINVAL;
> >
> > - if (len > r_evt->evt->max_payld_sz) {
> > + /* Events with a zero max_payld_sz are sized to be of the maximum
> Local multiline comment syntax seems to be
> /*
> * Events...
Yes of course...
>
> > + * size allowed by the transport: no need to be size-checked here
> > + * since the transport layer would have already dropped such
> > + * over-sized messages.
> > + */
> > + if (r_evt->evt->max_payld_sz && len > r_evt->evt->max_payld_sz) {
>
> > diff --git a/drivers/firmware/arm_scmi/protocols.h b/drivers/firmware/arm_scmi/protocols.h
> > index d62c4469d1fd..2e40a7bb5b01 100644
> > --- a/drivers/firmware/arm_scmi/protocols.h
> > +++ b/drivers/firmware/arm_scmi/protocols.h
> > @@ -161,8 +161,13 @@ struct scmi_proto_helpers_ops;
> > * @dev: A reference to the associated SCMI instance device (handle->dev).
> > * @xops: A reference to a struct holding refs to the core xfer operations that
> > * can be used by the protocol implementation to generate SCMI messages.
> > + * @hops: A reference to a struct holding refs to the common helper operations
> > + * that can be used by the protocol implementation.
>
> @hops isn't added in this patch so either it should be handled in where it was
> added, or if that was missed a precursor patch to this one.
Indeed.
Thanks,
Cristian
Powered by blists - more mailing lists