UefiCpuPkg/Cpuid: Remove wrong while-loop check after for-loop
authorJeff Fan <jeff.fan@intel.com>
Fri, 14 Oct 2016 06:40:58 +0000 (14:40 +0800)
committerJeff Fan <jeff.fan@intel.com>
Tue, 18 Oct 2016 01:15:44 +0000 (09:15 +0800)
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 <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
UefiCpuPkg/Application/Cpuid/Cpuid.c
UefiCpuPkg/Include/Register/Cpuid.h

index 8726a85..ac14c41 100644 (file)
@@ -617,8 +617,7 @@ CpuidStructuredExtendedFeatureFlags (
       PRINT_BIT_FIELD (Ecx, PKU);\r
       PRINT_BIT_FIELD (Ecx, OSPKE);\r
     }\r
-    SubLeaf++;\r
-  } while (SubLeaf <= Eax);\r
+  }\r
 }\r
 \r
 /**\r
index eb24840..864108d 100644 (file)
@@ -1275,8 +1275,7 @@ typedef union {
       SubLeaf,\r
       NULL, &Ebx.Uint32, &Ecx.Uint32, NULL\r
       );\r
-    SubLeaf++;\r
-  } while (SubLeaf <= Eax);\r
+  }\r
   @endcode\r
 **/\r
 #define CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS                0x07\r