From: Masakazu Mokuno Date: Wed, 29 Aug 2007 11:30:25 +0000 (+0900) Subject: [POWERPC] PS3: Fix bug where the major version part is not compared X-Git-Tag: v3.12-rc1~27036^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc43dca9e75b87d24a16d5be7b497e83837d9d31;p=kernel%2Fkernel-generic.git [POWERPC] PS3: Fix bug where the major version part is not compared Fix the bug that the major version part of the firmware version number is ignored in the comparison done by ps3_compare_firmware_version because the difference of two 64-bit quantities is returned as an int. Signed-off-by: Masakazu Mokuno Acked-by: Geoff Levand Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c index 2952b22..609945d 100644 --- a/arch/powerpc/platforms/ps3/setup.c +++ b/arch/powerpc/platforms/ps3/setup.c @@ -63,7 +63,8 @@ int ps3_compare_firmware_version(u16 major, u16 minor, u16 rev) x.minor = minor; x.rev = rev; - return (ps3_firmware_version.raw - x.raw); + return (ps3_firmware_version.raw > x.raw) - + (ps3_firmware_version.raw < x.raw); } EXPORT_SYMBOL_GPL(ps3_compare_firmware_version);