diff options
author | Icenowy Zheng <icenowy@aosc.xyz> | 2017-03-17 23:19:43 +0300 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-03-20 12:34:05 +0300 |
commit | b467e08a15563dede0d37d3233baa24fb97a7310 (patch) | |
tree | 4e8e49c564442885d61aa02141932aa71a378eae /drivers/clk/clk-stm32f4.c | |
parent | fe686babf4cf62b9b214b99847c735baa35a9fa2 (diff) | |
download | linux-b467e08a15563dede0d37d3233baa24fb97a7310.tar.xz |
clk: sunxi-ng: fix recalc_rate formula of NKMP clocks
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: e66f81bbd746 ("clk: sunxi-ng: Implement factors offsets")
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'drivers/clk/clk-stm32f4.c')
0 files changed, 0 insertions, 0 deletions