[PATCH] clk: imx: remove redundant re-assignment of pll->base

Colin Ian King posted 1 patch 4 years, 3 months ago
drivers/clk/imx/clk-sscg-pll.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] clk: imx: remove redundant re-assignment of pll->base
Posted by Colin Ian King 4 years, 3 months ago
There are two identical assignments of pll->base to the same value,
the second assignment is redundant and can be removed.

Cleans up cppcheck warning:
drivers/clk/imx/clk-sscg-pll.c:528:12: style: Variable 'pll->base' is
reassigned a value before the old one has been used. [redundantAssignment]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/clk/imx/clk-sscg-pll.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/imx/clk-sscg-pll.c b/drivers/clk/imx/clk-sscg-pll.c
index 9d6cdff0537f..81f304fae908 100644
--- a/drivers/clk/imx/clk-sscg-pll.c
+++ b/drivers/clk/imx/clk-sscg-pll.c
@@ -525,7 +525,6 @@ struct clk_hw *imx_clk_hw_sscg_pll(const char *name,
 	init.parent_names = parent_names;
 	init.num_parents = num_parents;
 
-	pll->base = base;
 	pll->hw.init = &init;
 
 	hw = &pll->hw;
-- 
2.34.1
Re: [PATCH] clk: imx: remove redundant re-assignment of pll->base
Posted by Stephen Boyd 4 years, 3 months ago
Quoting Colin Ian King (2022-03-03 01:05:08)
> There are two identical assignments of pll->base to the same value,
> the second assignment is redundant and can be removed.
> 
> Cleans up cppcheck warning:
> drivers/clk/imx/clk-sscg-pll.c:528:12: style: Variable 'pll->base' is
> reassigned a value before the old one has been used. [redundantAssignment]
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---

Applied to clk-next