From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 1/1] clk: ICS8N3QV01 remove superfluous code
Date: Sun, 16 Feb 2020 09:50:00 +0100 [thread overview]
Message-ID: <20200216095000.0126a445@jawa> (raw)
In-Reply-To: <20200215202738.15469-1-xypron.glpk@gmx.de>
On Sat, 15 Feb 2020 21:27:38 +0100
Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> 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
>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200216/67d79489/attachment.sig>
next prev parent reply other threads:[~2020-02-16 8:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-15 20:27 [PATCH 1/1] clk: ICS8N3QV01 remove superfluous code Heinrich Schuchardt
2020-02-16 8:50 ` Lukasz Majewski [this message]
2020-07-17 18:46 ` Heinrich Schuchardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200216095000.0126a445@jawa \
--to=lukma@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox