clk: baikal-t1: remove redundant assignment to variable 'divider'
Subsystems (2)
PATCH 1/1 clk: baikal-t1: remove redundant assignment to variable 'divider'
From: Colin Ian King <[email protected]>
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")
--- drivers/clk/baikal-t1/ccu-div.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/baikal-t1/ccu-div.c +1 -1
@@ -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);
Signature · 1 line
2.25.1
Quoted 5 lines · Colin King
From: Colin Ian King <[email protected]>
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.
Right. Thanks.
Quoted 23 lines
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>--- drivers/clk/baikal-t1/ccu-div.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/baikal-t1/ccu-div.c +1
-1@@ -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);Signature · 1 line
2.25.1
Quoting Colin King (2020-06-02 10:24:35)
Quoted 9 lines
From: Colin Ian King <[email protected]>
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 <[email protected]>---
Applied to clk-next