From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx2.suse.de", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTP id 29E4BDDDFF for ; Tue, 28 Aug 2007 23:26:58 +1000 (EST) From: Andreas Schwab To: Masakazu Mokuno Subject: Re: [PATCH] PS3: fix the bug the major version part is not compared References: <20070828211415.C2B5.MOKUNO@sm.sony.co.jp> Date: Tue, 28 Aug 2007 15:26:50 +0200 In-Reply-To: <20070828211415.C2B5.MOKUNO@sm.sony.co.jp> (Masakazu Mokuno's message of "Tue\, 28 Aug 2007 21\:32\:29 +0900") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Cc: Geert Uytterhoeven , linuxppc-dev@ozlabs.org, paulus@samba.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Masakazu Mokuno writes: > Fix the bug that the major version part of the firmware > is not compared. > > Signed-off-by: Masakazu Mokuno > CC: Geoff Levand > --- > 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); Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."