public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/1] clk: ICS8N3QV01 remove superfluous code
@ 2020-02-15 20:27 Heinrich Schuchardt
  2020-02-16  8:50 ` Lukasz Majewski
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2020-02-15 20:27 UTC (permalink / raw)
  To: u-boot

Do not calculate a unused value of n which is overwritten in both branches
of the subsequent if statement.

Identified by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/clk/ics8n3qv01.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/ics8n3qv01.c b/drivers/clk/ics8n3qv01.c
index e85ab1f9a0..984379bb12 100644
--- a/drivers/clk/ics8n3qv01.c
+++ b/drivers/clk/ics8n3qv01.c
@@ -81,7 +81,6 @@ static int ics8n3qv01_calc_parameters(uint fout, uint *_mint, uint *_mfrac,
 	uint n, foutiic, fvcoiic, mint;
 	u64 mfrac;

-	n = (2215000000U + fout / 2) / fout;
 	if (fout < 417000000U)
 		n = 2 * ((2215000000U / 2 + fout / 2) / fout);
 	else
--
2.25.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-17 18:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-15 20:27 [PATCH 1/1] clk: ICS8N3QV01 remove superfluous code Heinrich Schuchardt
2020-02-16  8:50 ` Lukasz Majewski
2020-07-17 18:46   ` Heinrich Schuchardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox