Skip to content

Commit

Permalink
[POWERPC] PS3: Fix bug where the major version part is not compared
Browse files Browse the repository at this point in the history
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 <mokuno@sm.sony.co.jp>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Masakazu Mokuno authored and Paul Mackerras committed Aug 30, 2007
1 parent 13a6976 commit fc43dca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/ps3/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit fc43dca

Please sign in to comment.