[edk2-devel] [PATCH v1 03/10] DynamicTablesPkg: Rename single char input parameter
PierreGondois
pierre.gondois at arm.com
Wed Jun 23 11:05:17 UTC 2021
From: Pierre Gondois <Pierre.Gondois at arm.com>
The Ecc tool forbids the usage of one char variable: Ecc error 8007:
"There should be no use of short (single character) variable names"
To follow this policy, rename this one letter parameter.
Signed-off-by: Pierre Gondois <Pierre.Gondois at arm.com>
---
DynamicTablesPkg/Include/Library/AcpiHelperLib.h | 6 +++---
.../Library/Common/AcpiHelperLib/AcpiHelper.c | 14 +++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/DynamicTablesPkg/Include/Library/AcpiHelperLib.h b/DynamicTablesPkg/Include/Library/AcpiHelperLib.h
index 2731a2e4fb27..b653c3cb69ef 100644
--- a/DynamicTablesPkg/Include/Library/AcpiHelperLib.h
+++ b/DynamicTablesPkg/Include/Library/AcpiHelperLib.h
@@ -22,15 +22,15 @@
/** Convert a hex number to its ASCII code.
- @param [in] x Hex number to convert.
- Must be 0 <= x < 16.
+ @param [in] Hex Hex number to convert.
+ Must be 0 <= x < 16.
@return The ASCII code corresponding to x.
**/
UINT8
EFIAPI
AsciiFromHex (
- IN UINT8 x
+ IN UINT8 Hex
);
/** Check if a HID is a valid PNP ID.
diff --git a/DynamicTablesPkg/Library/Common/AcpiHelperLib/AcpiHelper.c b/DynamicTablesPkg/Library/Common/AcpiHelperLib/AcpiHelper.c
index 85a32269aae5..19840fb173eb 100644
--- a/DynamicTablesPkg/Library/Common/AcpiHelperLib/AcpiHelper.c
+++ b/DynamicTablesPkg/Library/Common/AcpiHelperLib/AcpiHelper.c
@@ -14,23 +14,23 @@
/** Convert a hex number to its ASCII code.
- @param [in] x Hex number to convert.
- Must be 0 <= x < 16.
+ @param [in] Hex Hex number to convert.
+ Must be 0 <= x < 16.
@return The ASCII code corresponding to x.
**/
UINT8
EFIAPI
AsciiFromHex (
- IN UINT8 x
+ IN UINT8 Hex
)
{
- if (x < 10) {
- return (UINT8)(x + '0');
+ if (Hex < 10) {
+ return (UINT8)(Hex + '0');
}
- if (x < 16) {
- return (UINT8)(x - 10 + 'A');
+ if (Hex < 16) {
+ return (UINT8)(Hex - 10 + 'A');
}
ASSERT (FALSE);
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76932): https://edk2.groups.io/g/devel/message/76932
Mute This Topic: https://groups.io/mt/83735186/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list