Skip to content

Commit 52d1a8d

Browse files
Colin Ian Kingbebarino
authored andcommitted
clk: socfpga: remove redundant initialization of variable div
The variable div 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]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Dinh Nguyen <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 657d4d1 commit 52d1a8d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/clk/socfpga/clk-gate-s10.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static unsigned long socfpga_dbg_clk_recalc_rate(struct clk_hw *hwclk,
3131
unsigned long parent_rate)
3232
{
3333
struct socfpga_gate_clk *socfpgaclk = to_socfpga_gate_clk(hwclk);
34-
u32 div = 1, val;
34+
u32 div, val;
3535

3636
val = readl(socfpgaclk->div_reg) >> socfpgaclk->shift;
3737
val &= GENMASK(socfpgaclk->width - 1, 0);

drivers/clk/socfpga/clk-pll-s10.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static unsigned long clk_boot_clk_recalc_rate(struct clk_hw *hwclk,
107107
unsigned long parent_rate)
108108
{
109109
struct socfpga_pll *socfpgaclk = to_socfpga_clk(hwclk);
110-
u32 div = 1;
110+
u32 div;
111111

112112
div = ((readl(socfpgaclk->hw.reg) &
113113
SWCTRLBTCLKSEL_MASK) >>

0 commit comments

Comments
 (0)