* [PATCH][next] clk: intel: remove redundant initialization of variable rate64
@ 2020-05-28 22:12 Colin King
2020-05-28 23:00 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-05-28 22:12 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Rahul Tanwar, linux-clk
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/clk/x86/clk-cgu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/x86/clk-cgu.c b/drivers/clk/x86/clk-cgu.c
index 802a7fa88535..56af0e04ec1e 100644
--- a/drivers/clk/x86/clk-cgu.c
+++ b/drivers/clk/x86/clk-cgu.c
@@ -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);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] clk: intel: remove redundant initialization of variable rate64
2020-05-28 22:12 [PATCH][next] clk: intel: remove redundant initialization of variable rate64 Colin King
@ 2020-05-28 23:00 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2020-05-28 23:00 UTC (permalink / raw)
To: Colin King, Michael Turquette, Rahul Tanwar, linux-clk
Cc: kernel-janitors, linux-kernel
Quoting Colin King (2020-05-28 15:12:19)
> From: Colin Ian King <colin.king@canonical.com>
>
> 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")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-28 23:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 22:12 [PATCH][next] clk: intel: remove redundant initialization of variable rate64 Colin King
2020-05-28 23:00 ` 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).