From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.6034.1624446345595381956 for ; Wed, 23 Jun 2021 04:05:45 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 37EEF31B; Wed, 23 Jun 2021 04:05:45 -0700 (PDT) Received: from e120189.arm.com (unknown [10.57.78.245]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3A5693F719; Wed, 23 Jun 2021 04:05:44 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, Sami.Mujawar@arm.com, Alexei.Fedorov@arm.com Subject: [PATCH v1 03/10] DynamicTablesPkg: Rename single char input parameter Date: Wed, 23 Jun 2021 12:05:17 +0100 Message-Id: <20210623110525.6171-4-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210623110525.6171-1-Pierre.Gondois@arm.com> References: <20210623110525.6171-1-Pierre.Gondois@arm.com> From: Pierre Gondois 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 --- 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