From 3d4cc43577b08ba4d9d6bd2907ec8f6304a6fe2b Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Wed, 21 Aug 2024 11:07:13 +0200 Subject: [PATCH] [review] drivers: scmi-msg: fix clock rates description remaining count Simplify computation of the number of rates remaining after current enumeration. Signed-off-by: Etienne Carriere --- core/drivers/scmi-msg/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/drivers/scmi-msg/clock.c b/core/drivers/scmi-msg/clock.c index 4213e8fa3b1..ac30570e4b1 100644 --- a/core/drivers/scmi-msg/clock.c +++ b/core/drivers/scmi-msg/clock.c @@ -321,7 +321,7 @@ static void scmi_clock_describe_rates(struct scmi_msg *msg) } out_count = rate_index - in_args->rate_index; - remaining = nb_rates - in_args->rate_index - out_count; + remaining = nb_rates - rate_index; p2a.num_rates_flags = SCMI_RATES_BY_ARRAY(out_count, remaining); } else if (status == SCMI_NOT_SUPPORTED) { unsigned long triplet[3] = { 0, 0, 0 };