mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: jiping huang <huangjiping95@qq.com>
To: mturquette@baylibre.com, sboyd@kernel.org
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	jiping huang <huangjiping95@qq.com>
Subject: [PATCH] clk: Delete redundant logic.
Date: Mon, 26 Aug 2024 16:29:39 +0800	[thread overview]
Message-ID: <tencent_713186AE6290AC7B8037FD247F5BF04C0308@qq.com> (raw)

In fact, the local variable "best_parent_rate" saved at the function
entrance is not used later on.

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 */
-- 
2.34.1



             reply	other threads:[~2024-08-26  8:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26  8:29 jiping huang [this message]
2024-08-26  9:40 ` Vladimir Zapolskiy
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=tencent_713186AE6290AC7B8037FD247F5BF04C0308@qq.com \
    --to=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®