From fc43dca9e75b87d24a16d5be7b497e83837d9d31 Mon Sep 17 00:00:00 2001 From: Masakazu Mokuno Date: Wed, 29 Aug 2007 20:30:25 +0900 Subject: [PATCH] [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 --- arch/powerpc/platforms/ps3/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c index 2952b22f1c84..609945dbe394 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); -- 2.20.1