kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: baikal-t1: remove redundant assignment to variable 'divider'
@ 2020-06-02 17:24 Colin King
  2020-06-02 23:25 ` Serge Semin
  2020-06-09 20:45 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2020-06-02 17:24 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Serge Semin, linux-clk
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable divider is being initialized with a value that is never read
and it is being updated later with a new value.  The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/clk/baikal-t1/ccu-div.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/baikal-t1/ccu-div.c b/drivers/clk/baikal-t1/ccu-div.c
index bd40f5936f08..4062092d67f9 100644
--- a/drivers/clk/baikal-t1/ccu-div.c
+++ b/drivers/clk/baikal-t1/ccu-div.c
@@ -248,7 +248,7 @@ static int ccu_div_var_set_rate_fast(struct clk_hw *hw, unsigned long rate,
 				     unsigned long parent_rate)
 {
 	struct ccu_div *div = to_ccu_div(hw);
-	unsigned long flags, divider = 1;
+	unsigned long flags, divider;
 	u32 val;
 
 	divider = ccu_div_var_calc_divider(rate, parent_rate, div->mask);
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-09 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02 17:24 [PATCH] clk: baikal-t1: remove redundant assignment to variable 'divider' Colin King
2020-06-02 23:25 ` Serge Semin
2020-06-09 20:45 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).