[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6cb9d478-ce85-4b07-82be-a5f517654a78@linaro.org>
Date: Mon, 26 Aug 2024 12:40:37 +0300
From: Vladimir Zapolskiy <vladimir.zapolskiy@...aro.org>
To: jiping huang <huangjiping95@...com>, mturquette@...libre.com,
sboyd@...nel.org
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: Delete redundant logic.
On 8/26/24 11:29, jiping huang wrote:
> In fact, the local variable "best_parent_rate" saved at the function
> entrance is not used later on.
It's non-obvious that the stored value is not used later on in the function,
and likely there are use-cases, when it is used.
However the very least the commit message is obviously wrong stating that the
local variable is not used later on, since the local variable is used later on.
You need a more solid justification for the change.
> Signed-off-by: jiping huang <huangjiping95@...com>
>
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 8cca52be993f..d076939c42ab 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -2295,11 +2295,6 @@ static struct clk_core *clk_calc_new_rates(struct clk_core *core,
> if (IS_ERR_OR_NULL(core))
> return NULL;
>
> - /* save parent rate, if it exists */
> - parent = old_parent = core->parent;
> - if (parent)
> - best_parent_rate = parent->rate;
> -
> clk_core_get_boundaries(core, &min_rate, &max_rate);
>
> /* find the closest rate and parent clk/rate */
--
Best wishes,
Vladimir
Powered by blists - more mailing lists