From: Jeff Fan <jeff.fan@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>,
Michael Kinney <michael.d.kinney@intel.com>,
Feng Tian <feng.tian@intel.com>
Subject: [[patch]] UefiCpuPkg/Cpuid: Remove wrong while-loop check after for-loop
Date: Fri, 14 Oct 2016 15:04:17 +0800 [thread overview]
Message-ID: <20161014070417.7992-1-jeff.fan@intel.com> (raw)
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
next reply other threads:[~2016-10-14 7:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 7:04 Jeff Fan [this message]
2016-10-14 7:07 ` [[patch]] UefiCpuPkg/Cpuid: Remove wrong while-loop check after for-loop Gao, Liming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161014070417.7992-1-jeff.fan@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox