* Re: [PATCH] clk: sunxi-ng: fix recalc_rate formula of NKMP clocks
[not found] <20170317201943.45190-1-icenowy@aosc.xyz>
@ 2017-03-20 9:33 ` Maxime Ripard
0 siblings, 0 replies; only message in thread
From: Maxime Ripard @ 2017-03-20 9:33 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Chen-Yu Tsai, Quentin Schulz, linux-clk, linux-arm-kernel,
linux-kernel, linux-sunxi
[-- Attachment #1: Type: text/plain, Size: 920 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-20 9:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20170317201943.45190-1-icenowy@aosc.xyz>
2017-03-20 9:33 ` [PATCH] clk: sunxi-ng: fix recalc_rate formula of NKMP clocks Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®