Subject: Re: [PATCH v2 11/13] firmware: arm_scmi: Add bound iterators support

From: Peng Fan <[email-masked]>
Date: Tue, 17 Mar 2026 15:44:02 +0800

On Tue, Mar 10, 2026 at 06:40:28PM +0000, Cristian Marussi wrote:
>SCMI core stack provides some common helpers to handle in a unified way
>multipart message replies: such iterator-helpers, when run, currently
>process by default the whole set of discovered resources.
>
>Introduce an alternative way to run the initialized iterator on a limited
>range of resources.
>
>Note that the subset of resources that can be chosen is anyway limited by
>the SCMI protocol specification, since you are only allowed to choose the
>startindex on a multi-part enumeration NOT the end index, so that the
>effective number of returned items by a bound iterators depends really
>on platform side decisions.
>
>Suggested-by: Etienne Carriere <[email-masked]>
>Signed-off-by: Cristian Marussi <[email-masked]>
>---
>+static void scmi_iterator_cleanup(void *iter)
>+{
>+	struct scmi_iterator *i = iter;

I see you use no_free_ptr for allocation,
Do we need to use __free for i or drop the __free usage in allocation? 

Regards
Peng

>+
>+	i->ph->xops->xfer_put(i->ph, i->t);
>+	kfree(i);
>+}
>+