From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: sunxi-ng: fix recalc_rate formula of NKMP clocks
Date: Mon, 20 Mar 2017 10:33:55 +0100 [thread overview]
Message-ID: <20170320093355.wougjul675q3hru7@lukather> (raw)
In-Reply-To: <20170317201943.45190-1-icenowy@aosc.xyz>
On Sat, Mar 18, 2017 at 04:19:43AM +0800, Icenowy Zheng wrote:
> In commit e66f81bbd746 ("clk: sunxi-ng: Implement factors offsets"), the
> final formula of NKMP clocks' recalc_rate is refactored; however, the
> refactored formula broke the calculation due to some C language operand
> priority problem -- the priority of operand >> is lower than * and /,
> makes the formula being parsed as "(parent_rate * n * k) >> (p / m)", but
> it should be "(parent_rate * n * k >> p) / m".
>
> Add the pair of parentheses to fix up this issue. This pair of
> parentheses used to exist in the old formula.
>
> Fixes: commit e66f81bbd746 ("clk: sunxi-ng: Implement factors offsets")
You shouldn't have commit here.
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Fixed it, and applied, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170320/5741ef4a/attachment.sig>
prev parent reply other threads:[~2017-03-20 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-17 20:19 [PATCH] clk: sunxi-ng: fix recalc_rate formula of NKMP clocks Icenowy Zheng
2017-03-20 9:33 ` Maxime Ripard [this message]
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=20170320093355.wougjul675q3hru7@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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