mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
To: jiping huang <huangjiping95@qq.com>,
	mturquette@baylibre.com, sboyd@kernel.org
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: Delete redundant logic.
Date: Mon, 26 Aug 2024 12:40:37 +0300	[thread overview]
Message-ID: <6cb9d478-ce85-4b07-82be-a5f517654a78@linaro.org> (raw)
In-Reply-To: <tencent_713186AE6290AC7B8037FD247F5BF04C0308@qq.com>

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@qq.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

  reply	other threads:[~2024-08-26  9:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26  8:29 jiping huang
2024-08-26  9:40 ` Vladimir Zapolskiy [this message]
2024-08-26 14:45   ` jiping huang
2024-08-27 10:37 ` kernel test robot
2024-08-29  9:52 ` Dan Carpenter

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=6cb9d478-ce85-4b07-82be-a5f517654a78@linaro.org \
    --to=vladimir.zapolskiy@linaro.org \
    --cc=huangjiping95@qq.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    /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

all inboxes | Powered by JetHome®