Re: [PATCH v3 04/15] firmware: arm_scmi: Simplify clock rates exposed interface

Geert Uytterhoeven
2026-05-05T12:18:05Z

Hi Cristian, Sudeep,

On Tue, 28 Apr 2026 at 22:16, Cristian Marussi <cristian.marussi@arm.com> wrote:
> Introduce a new internal struct scmi_clock_desc so as to be able to hide,
> in the future, some of the needlessly public fields currently kept inside
> scmi_clock_info, while keeping exposed only the two new min_rate and
> max_rate fields for each clock.
>
> No functional change.
>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
> Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>

Thanks for your patch, which is now commit 83fd9d34b6b75be5 ("firmware:
arm_scmi: Simplify clock rates exposed interface") in scmi/for-linux-next.

> --- a/drivers/firmware/arm_scmi/clock.c
> +++ b/drivers/firmware/arm_scmi/clock.c

> @@ -457,14 +466,14 @@ iter_clk_describe_update_state(struct scmi_iterator_state *st,
> flags = le32_to_cpu(r->num_rates_flags);
> st->num_remaining = NUM_REMAINING(flags);
> st->num_returned = NUM_RETURNED(flags);
> - p->clk->rate_discrete = RATE_DISCRETE(flags);

This removes the last setter of scmi_clock_info.rate_discrete.
However, it is still used until the next commit cd73d1bfaa8d34bb
("clk: scmi: Use new simplified per-clock rate properties").
V2 did now have this issue, as the patches were ordered differently
in that series.

After both commits, there are no more users of
scmi_clock_info.rate_discrete, so it can be removed.

> + p->clkd->rate_discrete = RATE_DISCRETE(flags);
>
> /* Warn about out of spec replies ... */
> - if (!p->clk->rate_discrete &&
> + if (!p->clkd->rate_discrete &&
> (st->num_returned != 3 || st->num_remaining != 0)) {
> dev_warn(p->dev,
> "Out-of-spec CLOCK_DESCRIBE_RATES reply for %s - returned:%d remaining:%d rx_len:%zd\n",
> - p->clk->name, st->num_returned, st->num_remaining,
> + p->clkd->info.name, st->num_returned, st->num_remaining,
> st->rx_len);
>
> SCMI_QUIRK(clock_rates_triplet_out_of_spec,

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds