Thread (18 messages) 18 messages, 3 authors, 2025-09-05

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

From: Cristian Marussi <cristian.marussi@arm.com>
Date: 2025-08-21 08:09:04
Also in: arm-scmi, lkml

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 <redacted>
---
...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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help