Re: [PATCH RFC v2 1/7] firmware: arm_scmi: move boiler plate code into the get info functions

From: Cristian Marussi
Date: Thu Aug 21 2025 - 04:12:26 EST


On Sun, Jul 20, 2025 at 02:38:35PM -0500, Dan Carpenter wrote:
> This code to check whether the selector is valid and if the item has
> already been recorded in the array can be moved to the
> scmi_pinctrl_get_function_info() type functions. That way it's in
> one place instead of duplicated in each of the callers.
>

Hi,

> I removed the check for if "pi->nr_groups == 0" because if that were the
> case then "selector >= pi->nr_groups" would already be true. It already
> was not checked for pins so this makes things a bit more uniform.
>
> I also removed the check for if (!pin) since pin is an offset into the
> middle of an array and can't be NULL.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---

...has anything change in this commit from V1 ?

Asking because there is no version-diff and you did not pick up my
Reviewed-by tag from V1, so I am wondering if there is anything to
review or not..

Thanks,
Cristian