提交 fc43dca9 编写于 作者: M Masakazu Mokuno 提交者: Paul Mackerras

[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: NMasakazu Mokuno <mokuno@sm.sony.co.jp>
Acked-by: NGeoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 13a6976a
...@@ -63,7 +63,8 @@ int ps3_compare_firmware_version(u16 major, u16 minor, u16 rev) ...@@ -63,7 +63,8 @@ int ps3_compare_firmware_version(u16 major, u16 minor, u16 rev)
x.minor = minor; x.minor = minor;
x.rev = rev; 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); EXPORT_SYMBOL_GPL(ps3_compare_firmware_version);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册