public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: Jonathan Cameron <jonathan.cameron@huawei.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, sudeep.holla@arm.com,
	james.quinlan@broadcom.com, f.fainelli@gmail.com,
	vincent.guittot@linaro.org, etienne.carriere@st.com,
	peng.fan@oss.nxp.com, michal.simek@amd.com,
	dan.carpenter@linaro.org, d-gole@ti.com, elif.topuz@arm.com,
	lukasz.luba@arm.com, philip.radford@arm.com,
	souvik.chakravarty@arm.com
Subject: Re: [PATCH v2 03/17] firmware: arm_scmi: Allow protocols to register for notifications
Date: Mon, 19 Jan 2026 15:49:27 +0000	[thread overview]
Message-ID: <aW5Sh1lIS0n_2Fyr@pluto> (raw)
In-Reply-To: <20260119113326.00005902@huawei.com>

On Mon, Jan 19, 2026 at 11:33:26AM +0000, Jonathan Cameron wrote:
> On Wed, 14 Jan 2026 11:46:07 +0000
> Cristian Marussi <cristian.marussi@arm.com> wrote:
> 
> > Allow protocols themselves to register for their own notifications and
> 
> and provide their own notifier callbacks.
> 
> > 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.
> 
> I'm not keen on the 'while at that' part of the patch. In an ideal
> world that's a separate patch.

Yes indeed...it was tempting to do it together with the rework since it
was the only usecase that triggered the 'while-at' change...

...but this series in general needs more splitting both at the protocol
level and at the FS level (once I get some feedback from FS guys) so I
will split this out too.

> 
> One other comment inline.
> 
> Jonathan
> p.s. You get to my review victim whilst I run a particularly annoying
> bisection on the other screen (completely unrelated!) :)
> 
> > 
> > Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
> > ---
> > v1-->v2
> >  - Fixed multiline comment format
> > ---
> >  drivers/firmware/arm_scmi/common.h    |  4 ++++
> >  drivers/firmware/arm_scmi/driver.c    | 12 ++++++++++++
> >  drivers/firmware/arm_scmi/notify.c    | 28 ++++++++++++++++++++-------
> >  drivers/firmware/arm_scmi/notify.h    |  8 ++++++--
> >  drivers/firmware/arm_scmi/protocols.h |  6 ++++++
> >  5 files changed, 49 insertions(+), 9 deletions(-)
> > 
> 
> 
> > diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c
> > index 78e9e27dc9ec..e84b4dbefe82 100644
> > --- a/drivers/firmware/arm_scmi/notify.c
> > +++ b/drivers/firmware/arm_scmi/notify.c
> 
> 
> > @@ -779,8 +787,13 @@ int scmi_register_protocol_events(const struct scmi_handle *handle, u8 proto_id,
> >  	}
> >  
> >  	evt = ee->evts;
> > -	for (i = 0; i < ee->num_events; i++)
> > +	for (i = 0; i < ee->num_events; i++) {
> > +		if (evt[i].max_payld_sz == 0) {
> > +			payld_sz = max_msg_sz;
> > +			break;
> > +		}
> >  		payld_sz = max_t(size_t, payld_sz, evt[i].max_payld_sz);
> 
> Everything here seems to already be a size_t.  It is rare that we actually need max_t over
> max, and definitely not when all the types match.
> 		payld_sz = max(payl_sz, evt[i].max_payld_sz);

...indeed...I will fix.

Thanks,
Cristian

  reply	other threads:[~2026-01-19 15:49 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14 11:46 [PATCH v2 00/17] Introduce SCMI Telemetry FS support Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 01/17] firmware: arm_scmi: Define a common SCMI_MAX_PROTOCOLS value Cristian Marussi
2026-01-19 11:18   ` Jonathan Cameron
2026-01-19 15:43     ` Cristian Marussi
2026-01-20  6:44     ` Dhruva Gole
2026-01-20 10:55       ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 02/17] firmware: arm_scmi: Reduce the scope of protocols mutex Cristian Marussi
2026-01-19 11:21   ` Jonathan Cameron
2026-01-19 15:45     ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 03/17] firmware: arm_scmi: Allow protocols to register for notifications Cristian Marussi
2026-01-19 11:33   ` Jonathan Cameron
2026-01-19 15:49     ` Cristian Marussi [this message]
2026-01-14 11:46 ` [PATCH v2 04/17] uapi: Add ARM SCMI definitions Cristian Marussi
2026-01-19 11:43   ` Jonathan Cameron
2026-01-19 15:51     ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 05/17] firmware: arm_scmi: Add Telemetry protocol support Cristian Marussi
2026-01-19 16:29   ` Jonathan Cameron
2026-01-19 18:25     ` Cristian Marussi
2026-01-23 11:00   ` Elif Topuz
2026-03-26 13:32     ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 06/17] include: trace: Add Telemetry trace events Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 07/17] firmware: arm_scmi: Use new Telemetry traces Cristian Marussi
2026-01-23 11:43   ` Elif Topuz
2026-03-26 15:35     ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 08/17] firmware: arm_scmi: Add System Telemetry driver Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 09/17] fs/stlmfs: Document ARM SCMI Telemetry filesystem Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 10/17] firmware: arm_scmi: Add System Telemetry ioctls support Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 11/17] fs/stlmfs: Document alternative ioctl based binary interface Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 12/17] firmware: arm_scmi: Add Telemetry components view Cristian Marussi
2026-01-16 13:35   ` Elif Topuz
2026-01-19 15:42     ` Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 13/17] fs/stlmfs: Document alternative topological view Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 14/17] [RFC] docs: stlmfs: Document ARM SCMI Telemetry FS ABI Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 15/17] [RFC] firmware: arm_scmi: Add lazy population support to Telemetry FS Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 16/17] fs/stlmfs: Document lazy mode and related mount option Cristian Marussi
2026-01-14 11:46 ` [PATCH v2 17/17] [RFC] tools/scmi: Add SCMI Telemetry testing tool Cristian Marussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aW5Sh1lIS0n_2Fyr@pluto \
    --to=cristian.marussi@arm.com \
    --cc=arm-scmi@vger.kernel.org \
    --cc=d-gole@ti.com \
    --cc=dan.carpenter@linaro.org \
    --cc=elif.topuz@arm.com \
    --cc=etienne.carriere@st.com \
    --cc=f.fainelli@gmail.com \
    --cc=james.quinlan@broadcom.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=michal.simek@amd.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=philip.radford@arm.com \
    --cc=souvik.chakravarty@arm.com \
    --cc=sudeep.holla@arm.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox