[PATCH] PS3: fix the bug the major version part is not compared

Masakazu Mokuno mokuno at sm.sony.co.jp
Wed Aug 29 21:21:14 EST 2007


On Tue, 28 Aug 2007 15:26:50 +0200
Andreas Schwab <schwab at suse.de> wrote:

> Masakazu Mokuno <mokuno at sm.sony.co.jp> writes:
> 
> > Fix the bug that the major version part of the firmware 
> > is not compared.
> >
> > Signed-off-by: Masakazu Mokuno <mokuno at sm.sony.co.jp>
> > CC: Geoff Levand <geoffrey.levand at am.sony.com>
> > ---
> >  arch/powerpc/platforms/ps3/setup.c |    2 +-
> >  include/asm-powerpc/ps3.h          |    2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > --- a/arch/powerpc/platforms/ps3/setup.c
> > +++ b/arch/powerpc/platforms/ps3/setup.c
> > @@ -54,7 +54,7 @@ void ps3_get_firmware_version(union ps3_
> >  }
> >  EXPORT_SYMBOL_GPL(ps3_get_firmware_version);
> >  
> > -int ps3_compare_firmware_version(u16 major, u16 minor, u16 rev)
> > +s64 ps3_compare_firmware_version(u16 major, u16 minor, u16 rev)
> >  {
> >  	union ps3_firmware_version x;
> >  
> 
> Better yet: normalize the return value.
> 
> 	return (ps3_firmware_version.raw > x.raw) -
>                (ps3_firmware_version.raw < x.raw);


Thank you!
I'll submit new patch.


--
Masakazu MOKUNO




More information about the Linuxppc-dev mailing list