From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 26F6A1A1EC4 for ; Fri, 14 Oct 2016 00:07:26 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP; 14 Oct 2016 00:07:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,491,1473145200"; d="scan'208";a="19500790" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 14 Oct 2016 00:07:25 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 14 Oct 2016 00:07:25 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0248.002; Fri, 14 Oct 2016 15:07:23 +0800 From: "Gao, Liming" To: "Fan, Jeff" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Tian, Feng" Thread-Topic: [[patch]] UefiCpuPkg/Cpuid: Remove wrong while-loop check after for-loop Thread-Index: AQHSJek/moiCzPregkOZMqJEHBfQeaCnh2NA Date: Fri, 14 Oct 2016 07:07:22 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B493186@shsmsx102.ccr.corp.intel.com> References: <20161014070417.7992-1-jeff.fan@intel.com> In-Reply-To: <20161014070417.7992-1-jeff.fan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [[patch]] UefiCpuPkg/Cpuid: Remove wrong while-loop check after for-loop X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2016 07:07:26 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Fan, Jeff > Sent: Friday, October 14, 2016 3:04 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming ; Kinney, Michael D > ; Tian, Feng > Subject: [[patch]] UefiCpuPkg/Cpuid: Remove wrong while-loop check after > for-loop >=20 > while-loop check should not co-exist with for-loop. This should be typo w= hen > we > check-in the original code. We should keep one loop only. >=20 > This issue caused CLANG38 build failure reported by > https://tianocore.acgmultimedia.com/show_bug.cgi?id=3D148 >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Cc: Liming Gao > Cc: Michael Kinney > Cc: Feng Tian > Signed-off-by: Jeff Fan > --- > UefiCpuPkg/Application/Cpuid/Cpuid.c | 3 +-- > UefiCpuPkg/Include/Register/Cpuid.h | 3 +-- > 2 files changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/UefiCpuPkg/Application/Cpuid/Cpuid.c > b/UefiCpuPkg/Application/Cpuid/Cpuid.c > index 8726a85..ac14c41 100644 > --- a/UefiCpuPkg/Application/Cpuid/Cpuid.c > +++ b/UefiCpuPkg/Application/Cpuid/Cpuid.c > @@ -617,8 +617,7 @@ CpuidStructuredExtendedFeatureFlags ( > PRINT_BIT_FIELD (Ecx, PKU); > PRINT_BIT_FIELD (Ecx, OSPKE); > } > - SubLeaf++; > - } while (SubLeaf <=3D Eax); > + } > } >=20 > /** > diff --git a/UefiCpuPkg/Include/Register/Cpuid.h > b/UefiCpuPkg/Include/Register/Cpuid.h > index eb24840..864108d 100644 > --- a/UefiCpuPkg/Include/Register/Cpuid.h > +++ b/UefiCpuPkg/Include/Register/Cpuid.h > @@ -1275,8 +1275,7 @@ typedef union { > SubLeaf, > NULL, &Ebx.Uint32, &Ecx.Uint32, NULL > ); > - SubLeaf++; > - } while (SubLeaf <=3D Eax); > + } > @endcode > **/ > #define CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS 0x07 > -- > 2.9.3.windows.2