public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [[patch]] UefiCpuPkg/Cpuid: Remove wrong while-loop check after for-loop
@ 2016-10-14  7:04 Jeff Fan
  2016-10-14  7:07 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Fan @ 2016-10-14  7:04 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao, Michael Kinney, Feng Tian

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>
---
 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [[patch]] UefiCpuPkg/Cpuid: Remove wrong while-loop check after for-loop
  2016-10-14  7:04 [[patch]] UefiCpuPkg/Cpuid: Remove wrong while-loop check after for-loop Jeff Fan
@ 2016-10-14  7:07 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2016-10-14  7:07 UTC (permalink / raw)
  To: Fan, Jeff, edk2-devel@lists.01.org; +Cc: Kinney, Michael D, Tian, Feng

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Fan, Jeff
> Sent: Friday, October 14, 2016 3:04 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Tian, Feng <feng.tian@intel.com>
> Subject: [[patch]] UefiCpuPkg/Cpuid: Remove wrong while-loop check after
> for-loop
> 
> 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>
> ---
>  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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-14  7:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-14  7:04 [[patch]] UefiCpuPkg/Cpuid: Remove wrong while-loop check after for-loop Jeff Fan
2016-10-14  7:07 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox