From: Cristian Marussi <cristian.marussi@arm.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
Cristian Marussi <cristian.marussi@arm.com>,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC 1/7] firmware: arm_scmi: move boiler plate code into the get info functions
Date: Fri, 30 May 2025 13:48:15 +0100 [thread overview]
Message-ID: <aDmpD9qz-4RUXvFq@pluto> (raw)
In-Reply-To: <8bee4505bdc1d74e62533ed9975dc4500b2cfe53.1746443762.git.dan.carpenter@linaro.org>
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@arm.com>
Thanks,
Cristian
next prev parent reply other threads:[~2025-05-30 12:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 11:36 [RFC 0/7] pinctrl-scmi: Add GPIO support Dan Carpenter
2025-05-05 11:37 ` [RFC 1/7] firmware: arm_scmi: move boiler plate code into the get info functions Dan Carpenter
2025-05-30 12:48 ` Cristian Marussi [this message]
2025-05-05 11:37 ` [RFC 2/7] firmware: arm_scmi: add is_gpio() function Dan Carpenter
2025-05-30 13:09 ` Cristian Marussi
2025-05-07 8:54 ` [RFC 0/7] pinctrl-scmi: Add GPIO support Khaled Ali Ahmed
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=aDmpD9qz-4RUXvFq@pluto \
--to=cristian.marussi@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.holla@arm.com \
/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