]> git.proxmox.com Git - mirror_edk2.git/commitdiff
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 8726a85f4eb949be5339a87c683221ccc52d42ee..ac14c41ed650853cf74fbbe07bb2e6d30d7f5f97 100644 (file)
@@ -617,8 +617,7 @@ CpuidStructuredExtendedFeatureFlags (
       PRINT_BIT_FIELD (Ecx, PKU);\r
       PRINT_BIT_FIELD (Ecx, OSPKE);\r
     }\r
       PRINT_BIT_FIELD (Ecx, PKU);\r
       PRINT_BIT_FIELD (Ecx, OSPKE);\r
     }\r
-    SubLeaf++;\r
-  } while (SubLeaf <= Eax);\r
+  }\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
index eb24840746cc388bda78654eace0c808f5c54137..864108da62220cf45ccfb33e3ad1b85626533741 100644 (file)
@@ -1275,8 +1275,7 @@ typedef union {
       SubLeaf,\r
       NULL, &Ebx.Uint32, &Ecx.Uint32, NULL\r
       );\r
       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
   @endcode\r
 **/\r
 #define CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS                0x07\r