From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D0E6281847 for ; Wed, 4 Jan 2017 18:44:36 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP; 04 Jan 2017 18:44:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,318,1477983600"; d="scan'208";a="45845402" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 04 Jan 2017 18:44:36 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 4 Jan 2017 18:44:36 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 4 Jan 2017 18:44:35 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Thu, 5 Jan 2017 10:44:32 +0800 From: "Bi, Dandan" To: "Zhang, Chao B" , "edk2-devel@lists.01.org" CC: "Zhang, Chao B" Thread-Topic: [edk2] [PATCH 1/2] SecuritPkg: Tcg2: Fix coding style issue Thread-Index: AQHSZvn5bLXbGHv810mNLfeyKmSUEaEpLTWQ Date: Thu, 5 Jan 2017 02:44:32 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3B88B3E9@shsmsx102.ccr.corp.intel.com> References: <20170105021803.15968-1-chao.b.zhang@intel.com> In-Reply-To: <20170105021803.15968-1-chao.b.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 1/2] SecuritPkg: Tcg2: Fix coding style issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 02:44:36 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Dandan Bi Thanks, Dandan -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhan= g, Chao B Sent: Thursday, January 5, 2017 10:18 AM To: edk2-devel@lists.01.org Cc: Bi, Dandan ; Zhang, Chao B Subject: [edk2] [PATCH 1/2] SecuritPkg: Tcg2: Fix coding style issue Fix coding style issue Cc: Bi Dandan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang --- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 14 +++++++------- SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/= Tcg2Config/Tcg2ConfigImpl.c index 3e34155..1317dca 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c @@ -381,7 +381,7 @@ Tcg2RouteConfig ( /** Get HID string of TPM2 ACPI device object =20 - @param[in] HID Points to HID String Buffer. + @param[in] Hid Points to HID String Buffer. @param[in] Size HID String size in bytes. Must >=3D TPM_HI= D_ACPI_SIZE =20 @return HID String get status. @@ -389,7 +389,7 @@ Tcg2RouteConfig ( **/ EFI_STATUS GetTpm2HID( - CHAR8 *HID, + CHAR8 *Hid, UINTN Size ) { @@ -401,7 +401,7 @@ GetTpm2HID( =20 PnpHID =3D TRUE; =20 - ZeroMem(HID, Size); + ZeroMem(Hid, Size); =20 // // Get Manufacturer ID @@ -418,13 +418,13 @@ GetTpm2HID( // HID containing PNP ID "NNN####" // NNN is uppercase letter for Vendor ID specified by manufacturer // - CopyMem(HID, &ManufacturerID, 3); + CopyMem(Hid, &ManufacturerID, 3); } else { // // HID containing ACP ID "NNNN####" // NNNN is uppercase letter for Vendor ID specified by manufacture= r // - CopyMem(HID, &ManufacturerID, 4); + CopyMem(Hid, &ManufacturerID, 4); PnpHID =3D FALSE; } } else { @@ -441,9 +441,9 @@ GetTpm2HID( // #### is Firmware Version 1 // if (PnpHID) { - AsciiSPrint(HID + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", ((FirmwareVer= sion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)); + AsciiSPrint(Hid + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", ((FirmwareVer= sion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)); } else { - AsciiSPrint(HID + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVe= rsion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)); + AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVe= rsion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)); } =20 } else { diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tc= g2Smm.c index 968f327..3ca6958 100644 --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c @@ -317,7 +317,7 @@ UpdateHID ( { EFI_STATUS Status; UINT8 *DataPtr; - CHAR8 HID[TPM_HID_ACPI_SIZE]; + CHAR8 Hid[TPM_HID_ACPI_SIZE]; UINT32 ManufacturerID; UINT32 FirmwareVersion1; UINT32 FirmwareVersion2; @@ -328,7 +328,7 @@ UpdateHID ( // // Initialize HID with Default PNP string // - ZeroMem(HID, TPM_HID_ACPI_SIZE); + ZeroMem(Hid, TPM_HID_ACPI_SIZE); =20 // // Get Manufacturer ID @@ -345,13 +345,13 @@ UpdateHID ( // HID containing PNP ID "NNN####" // NNN is uppercase letter for Vendor ID specified by manufacturer // - CopyMem(HID, &ManufacturerID, 3); + CopyMem(Hid, &ManufacturerID, 3); } else { // // HID containing ACP ID "NNNN####" // NNNN is uppercase letter for Vendor ID specified by manufacture= r // - CopyMem(HID, &ManufacturerID, 4); + CopyMem(Hid, &ManufacturerID, 4); PnpHID =3D FALSE; } } else { @@ -368,9 +368,9 @@ UpdateHID ( // #### is Firmware Version 1 // if (PnpHID) { - AsciiSPrint(HID + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", ((FirmwareVer= sion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)); + AsciiSPrint(Hid + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", ((FirmwareVer= sion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)); } else { - AsciiSPrint(HID + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVe= rsion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)); + AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVe= rsion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF)); } =20 } else { @@ -387,14 +387,14 @@ UpdateHID ( DataPtr +=3D 1) { if (AsciiStrCmp((CHAR8 *)DataPtr, TPM_HID_TAG) =3D=3D 0) { if (PnpHID) { - CopyMem(DataPtr, HID, TPM_HID_PNP_SIZE); + CopyMem(DataPtr, Hid, TPM_HID_PNP_SIZE); // // if HID is PNP ID, patch the last byte in HID TAG to Noop // *(DataPtr + TPM_HID_PNP_SIZE) =3D AML_NOOP_OP; } else { =20 - CopyMem(DataPtr, HID, TPM_HID_ACPI_SIZE); + CopyMem(DataPtr, Hid, TPM_HID_ACPI_SIZE); } DEBUG((DEBUG_INFO, "TPM2 ACPI _HID is patched to %a\n", DataPtr)); =20 --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel