From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhang Haijun-B42677 Subject: RE: [PATCH 1/4 V2] powerpc/85xx: Add support for 85xx cpu type detection Date: Thu, 11 Jul 2013 09:02:10 +0000 Message-ID: <99E897753B6F7048BD8CCDB4661D02E139F499@039-SN2MPN1-021.039d.mgd.msft.net> References: <1373441941-32650-1-git-send-email-Haijun.Zhang@freescale.com> (from Haijun.Zhang@freescale.com on Wed Jul 10 02:39:01 2013) <1373492893.8183.236@snotra> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Return-path: Received: from co1ehsobe006.messaging.microsoft.com ([216.32.180.189]:33842 "EHLO co1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755618Ab3GKJAD convert rfc822-to-8bit (ORCPT ); Thu, 11 Jul 2013 05:00:03 -0400 In-Reply-To: Content-Language: en-US Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: David Laight , Wood Scott-B07421 Cc: Zhao Chenhui-B35336 , "linux-mmc@vger.kernel.org" , Wrobel Heinz-R39252 , Fleming Andy-AFLEMING , "cbouatmailru@gmail.com" , "cjb@laptop.org" , "linuxppc-dev@lists.ozlabs.org" , Xie Xiaobo-R63061 Thanks. Regards Haijun. > -----Original Message----- > From: David Laight [mailto:David.Laight@ACULAB.COM] > Sent: Thursday, July 11, 2013 4:44 PM > To: Wood Scott-B07421; Zhang Haijun-B42677 > Cc: Zhao Chenhui-B35336; linux-mmc@vger.kernel.org; Wrobel Heinz-R39252; > Fleming Andy-AFLEMING; Zhang Haijun-B42677; cbouatmailru@gmail.com; > cjb@laptop.org; linuxppc-dev@lists.ozlabs.org; Xie Xiaobo-R63061 > Subject: RE: [PATCH 1/4 V2] powerpc/85xx: Add support for 85xx cpu type > detection > > > > +#define IS_SVR_REV(svr, maj, min) \ > > > + ((SVR_MAJ(svr) == (maj)) && (SVR_MIN(svr) == (min))) > > > > I don't think IS_SVR_REV is needed. Callers can just do "if > > (SVR_REV(svr) == 0x30)" or whatever, especially since we're relying on > > them to do this for greater/less than comparisons. > > Not only that, I'd guess that 'maj' and 'min' are likely to be constants > - so you'd want to combine them and compare against 'svr' > rather than have two conditionals. [Haijun Wrote:] yes, e.g: 1.0, 1.1 or 2.0. 'Major revision field' + '.' + 'Minor revision field ' I had resent the patch(V2). I'm not so clear about what you want to express.^_^ > > David > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from co1outboundpool.messaging.microsoft.com (co1ehsobe003.messaging.microsoft.com [216.32.180.186]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "MSIT Machine Auth CA 2" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 896882C02ED for ; Thu, 11 Jul 2013 19:00:06 +1000 (EST) From: Zhang Haijun-B42677 To: David Laight , Wood Scott-B07421 Subject: RE: [PATCH 1/4 V2] powerpc/85xx: Add support for 85xx cpu type detection Date: Thu, 11 Jul 2013 09:02:10 +0000 Message-ID: <99E897753B6F7048BD8CCDB4661D02E139F499@039-SN2MPN1-021.039d.mgd.msft.net> References: <1373441941-32650-1-git-send-email-Haijun.Zhang@freescale.com> (from Haijun.Zhang@freescale.com on Wed Jul 10 02:39:01 2013) <1373492893.8183.236@snotra> In-Reply-To: Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Cc: Xie Xiaobo-R63061 , Zhao Chenhui-B35336 , "linux-mmc@vger.kernel.org" , Wrobel Heinz-R39252 , Fleming Andy-AFLEMING , "cbouatmailru@gmail.com" , "cjb@laptop.org" , "linuxppc-dev@lists.ozlabs.org" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Thanks. Regards Haijun. > -----Original Message----- > From: David Laight [mailto:David.Laight@ACULAB.COM] > Sent: Thursday, July 11, 2013 4:44 PM > To: Wood Scott-B07421; Zhang Haijun-B42677 > Cc: Zhao Chenhui-B35336; linux-mmc@vger.kernel.org; Wrobel Heinz-R39252; > Fleming Andy-AFLEMING; Zhang Haijun-B42677; cbouatmailru@gmail.com; > cjb@laptop.org; linuxppc-dev@lists.ozlabs.org; Xie Xiaobo-R63061 > Subject: RE: [PATCH 1/4 V2] powerpc/85xx: Add support for 85xx cpu type > detection >=20 > > > +#define IS_SVR_REV(svr, maj, min) \ > > > + ((SVR_MAJ(svr) =3D=3D (maj)) && (SVR_MIN(svr) =3D=3D (min))) > > > > I don't think IS_SVR_REV is needed. Callers can just do "if > > (SVR_REV(svr) =3D=3D 0x30)" or whatever, especially since we're relying= on > > them to do this for greater/less than comparisons. >=20 > Not only that, I'd guess that 'maj' and 'min' are likely to be constants > - so you'd want to combine them and compare against 'svr' > rather than have two conditionals. [Haijun Wrote:] yes, e.g: 1.0, 1.1 or 2.0. 'Major revision field' + '.' + '= Minor revision field ' I had resent the patch(V2). I'm not so clear about what you want to express= .^_^ =20 >=20 > David >=20 >=20 >=20