[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d6f147bf-2816-47d7-9a48-47562b8dde06@riscstar.com>
Date: Tue, 22 Jul 2025 07:32:56 -0500
From: Alex Elder <elder@...cstar.com>
To: Akhilesh Patil <akhilesh@...iitb.ac.in>, mturquette@...libre.com,
sboyd@...nel.org, dlan@...too.org, heylenay@....org, inochiama@...look.com,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
heylenay@...look.com, paul.walmsley@...ive.com, palmer@...belt.com,
aou@...s.berkeley.edu, alex@...ti.fr
Cc: linux-clk@...r.kernel.org, linux-riscv@...ts.infradead.org,
spacemit@...ts.linux.dev, linux-kernel@...r.kernel.org,
unicornxdotw@...mail.com, jszhang@...nel.org,
zhangmeng.kevin@...ux.spacemit.com, akhileshpatilvnit@...il.com,
skhan@...uxfoundation.org
Subject: Re: [PATCH] clk: spacemit: ccu_pll: fix error return value in
recalc_rate callback
On 7/21/25 2:07 PM, Akhilesh Patil wrote:
> Return 0 instead of -EINVAL if function ccu_pll_recalc_rate() fails to
> get correct rate entry. Follow .recalc_rate callback documentation
> as mentioned in include/linux/clk-provider.h for error return value.
"If the driver cannot figure out a rate for this clock, it
must return 0."
Looks good.
Reviewed-by: Alex Elder <elder@...cstar.com>
>
> Signed-off-by: Akhilesh Patil <akhilesh@...iitb.ac.in>
> ---
> drivers/clk/spacemit/ccu_pll.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/spacemit/ccu_pll.c b/drivers/clk/spacemit/ccu_pll.c
> index 4427dcfbbb97..45f540073a65 100644
> --- a/drivers/clk/spacemit/ccu_pll.c
> +++ b/drivers/clk/spacemit/ccu_pll.c
> @@ -122,7 +122,7 @@ static unsigned long ccu_pll_recalc_rate(struct clk_hw *hw,
>
> WARN_ON_ONCE(!entry);
>
> - return entry ? entry->rate : -EINVAL;
> + return entry ? entry->rate : 0;
> }
>
> static long ccu_pll_round_rate(struct clk_hw *hw, unsigned long rate,
Powered by blists - more mailing lists