[PATCH 3/7 v2] clk: atlas7: fix integer overflow in dto rate calculation

Stephen Boyd sboyd at codeaurora.org
Tue Aug 11 17:27:15 PDT 2015


On 08/04, Barry Song wrote:
> From: Yibo Cai <yibo.cai at csr.com>
> 
> 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: Yibo Cai <yibo.cai at csr.com>
> Signed-off-by: Barry Song <Baohua.Song at csr.com>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project



More information about the linux-arm-kernel mailing list