Home
last modified time | relevance | path

Searched hist:"740 ebe4a54fae1705705ec87ce511b16ffb50659" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/arch/mips/txx9/generic/
H A Dsetup_tx4927.cdiff 740ebe4a54fae1705705ec87ce511b16ffb50659 Thu Apr 02 11:01:21 CDT 2009 Atsushi Nemoto <anemo@mba.ocn.ne.jp> MIPS: TXx9: Fix possible overflow in clock calculations

Addition of -fwrapv option in 2.6.29 discloses possible overflow with
signed arithmetics. For example, result of "a * 6 / 12" (int a =
400000000) is 200000000 without -fwrapv but -157913941 with -fwrapv.

Change some variable to unsigned to avoid such overflows.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
H A Dsetup_tx4938.cdiff 740ebe4a54fae1705705ec87ce511b16ffb50659 Thu Apr 02 11:01:21 CDT 2009 Atsushi Nemoto <anemo@mba.ocn.ne.jp> MIPS: TXx9: Fix possible overflow in clock calculations

Addition of -fwrapv option in 2.6.29 discloses possible overflow with
signed arithmetics. For example, result of "a * 6 / 12" (int a =
400000000) is 200000000 without -fwrapv but -157913941 with -fwrapv.

Change some variable to unsigned to avoid such overflows.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>