[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aDmpD9qz-4RUXvFq@pluto>
Date: Fri, 30 May 2025 13:48:15 +0100
From: Cristian Marussi <cristian.marussi@....com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Sudeep Holla <sudeep.holla@....com>,
Cristian Marussi <cristian.marussi@....com>,
arm-scmi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC 1/7] firmware: arm_scmi: move boiler plate code into the
get info functions
On Mon, May 05, 2025 at 02:37:22PM +0300, 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 Dan,
thanks for this.
>
> 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.
>
A much needed and appreciated cleanup. LGTM.
Reviewed-by: Cristian Marussi <cristian.marussi@....com>
Thanks,
Cristian
Powered by blists - more mailing lists