clk: atlas7: fix integer overflow in dto rate calculation
I cannot believe that I spend quite a lot time in finding this bug. It seems a pitfall people tend to fall in. In "int64 = int32 * int32", conversion from 32-bits to 64-bits comes after the multiplication. So this statement may not work as expected. Signed-off-by: NYibo Cai <yibo.cai@csr.com> Signed-off-by: NBarry Song <Baohua.Song@csr.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
Showing
想要评论请 注册 或 登录