Skip to contentSkip to conversation

clk: intel: remove redundant initialization of variable rate64

PATCH Applied Colin King 2 participants 2 messages May 28, 2020

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 clk: intel: remove redundant initialization of variable rate64

From: Colin Ian King <[email protected]>

The variable rate64 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")

---
 drivers/clk/x86/clk-cgu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/x86/clk-cgu.c +1 -1
index 802a7fa88535..56af0e04ec1e 100644
@@ -538,7 +538,7 @@ lgm_clk_ddiv_round_rate(struct clk_hw *hw, unsigned long rate,
 	struct lgm_clk_ddiv *ddiv = to_lgm_clk_ddiv(hw);
 	u32 div, ddiv1, ddiv2;
 	unsigned long flags;
-	u64 rate64 = rate;
+	u64 rate64;
 
 	div = DIV_ROUND_CLOSEST_ULL((u64)*prate, rate);
 
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw

Quoting Colin King (2020-05-28 15:12:19)

Quoted 9 lines

From: Colin Ian King <[email protected]>

The variable rate64 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")

---

Applied to clk-next