From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 39A181A1ED2 for ; Fri, 14 Oct 2016 00:04:31 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 14 Oct 2016 00:04:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,491,1473145200"; d="scan'208";a="179735707" Received: from jfan12-desk.ccr.corp.intel.com ([10.239.9.5]) by fmsmga004.fm.intel.com with ESMTP; 14 Oct 2016 00:04:26 -0700 From: Jeff Fan To: edk2-devel@lists.01.org Cc: Liming Gao , Michael Kinney , Feng Tian Date: Fri, 14 Oct 2016 15:04:17 +0800 Message-Id: <20161014070417.7992-1-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 Subject: [[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:04:31 -0000 while-loop check should not co-exist with for-loop. This should be typo when we check-in the original code. We should keep one loop only. This issue caused CLANG38 build failure reported by https://tianocore.acgmultimedia.com/show_bug.cgi?id=148 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(-) 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 <= Eax); + } } /** 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 <= Eax); + } @endcode **/ #define CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS 0x07 -- 2.9.3.windows.2