clk: socfpga: remove redundant assignment on division
Subsystems (3)
PATCH 1/1 clk: socfpga: remove redundant assignment on division
The variable parent_rate is being divided by div and the result is re-assigned to parent_rate before being returned. The assignment is redundant, replace /= operator with just / operator.
--- drivers/clk/socfpga/clk-pll-s10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/socfpga/clk-pll-s10.c +1 -1
@@ -113,7 +113,7 @@ static unsigned long clk_boot_clk_recalc_rate(struct clk_hw *hwclk, SWCTRLBTCLKSEL_MASK) >> SWCTRLBTCLKSEL_SHIFT); div +=1 ; -return parent_rate /= div; +return parent_rate / div; }
Signature · 1 line
2.32.0
Quoted 14 lines · Colin Ian King
The variable
parent_rateis being divided by div and the result is re-assigned toparent_ratebefore being returned. The assignment is redundant, replace /= operator with just / operator.Signed-off-by Colin Ian King <[email protected]>--- drivers/clk/socfpga/clk-pll-s10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/socfpga/clk-pll-s10.c +0
-0
drivers/clk/socfpga/clk-pll-s10.c static unsigned long clk_boot_clk_recalc_rate(struct clk_hw *hwclk, · line 118
Quoted 7 lines
drivers/clk/socfpga/clk-pll-s10.c +1
-1@@ -113,7 +113,7 @@ static unsigned long clk_boot_clk_recalc_rate(struct clk_hw *hwclk, SWCTRLBTCLKSEL_MASK) >> SWCTRLBTCLKSEL_SHIFT); div +=1 ; -return parent_rate /= div; +return parent_rate / div; }
Quoting Colin Ian King (2021-12-20 16:37:50)
Quoted 6 lines
The variable
parent_rateis being divided by div and the result is re-assigned toparent_ratebefore being returned. The assignment is redundant, replace /= operator with just / operator.Signed-off-by Colin Ian King <[email protected]>---
Applied to clk-next