From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 0FFE020945C00 for ; Mon, 9 Oct 2017 19:31:21 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 09 Oct 2017 19:34:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,502,1500966000"; d="scan'208";a="1023469411" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 09 Oct 2017 19:34:49 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 9 Oct 2017 19:34:47 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 9 Oct 2017 19:34:47 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0319.002; Tue, 10 Oct 2017 10:34:45 +0800 From: "Bi, Dandan" To: "Chen, Chen A" , "edk2-devel@lists.01.org" CC: "Zhang, Chao B" Thread-Topic: [PATCH] SecurityPkg/SecureBootConfigImpl.c: Fix coding style issue. Thread-Index: AQHTQWzIolTZ7cqhnESLI3vpsAYKiaLcXXLw Date: Tue, 10 Oct 2017 02:34:44 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3B9A1A6D@shsmsx102.ccr.corp.intel.com> References: <20171010020841.19452-1-chen.a.chen@intel.com> In-Reply-To: <20171010020841.19452-1-chen.a.chen@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] SecurityPkg/SecureBootConfigImpl.c: Fix coding style issue. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 02:31:22 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bi Dandan Thanks, Dandan -----Original Message----- From: Chen, Chen A=20 Sent: Tuesday, October 10, 2017 10:09 AM To: edk2-devel@lists.01.org Cc: Chen, Chen A ; Bi, Dandan ;= Zhang, Chao B Subject: [PATCH] SecurityPkg/SecureBootConfigImpl.c: Fix coding style issue= . Fix coding style issue. Cc: Bi Dandan Cc: Zhang Chao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: chenc2 --- .../SecureBootConfigDxe/SecureBootConfigImpl.c | 30 +++++++++++-------= ---- .../SecureBootConfigDxe/SecureBootConfigImpl.h | 14 +++++----- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Secu= reBootConfigImpl.c index 457e020ece..3e5012e21b 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCo +++ nfigImpl.c @@ -3098,11 +3098,11 @@ DeleteSignatureEx ( goto ON_EXIT; } =20 - if (PrivateData->VariableName =3D=3D VARIABLE_DB) { + if (PrivateData->VariableName =3D=3D Variable_DB) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE); - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBX) { + } else if (PrivateData->VariableName =3D=3D Variable_DBX) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1); - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBT) { + } else if (PrivateData->VariableName =3D=3D Variable_DBT) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2); } else { goto ON_EXIT; @@ -3149,7 +3149,7 @@ DeleteSignatureEx ( =20 RemainingSize =3D VariableDataSize; ListWalker =3D (EFI_SIGNATURE_LIST *)(VariableData); - if (DelType =3D=3D DELETE_SIGNATURE_LIST_ALL) { + if (DelType =3D=3D Delete_Signature_List_All) { VariableDataSize =3D 0; } else { while ((RemainingSize > 0) && (RemainingSize >=3D ListWalker->Signatur= eListSize) && ListIndex < PrivateData->ListIndex) { @@ -3161,7 +3161,7 @@ D= eleteSignatureEx ( ListIndex++; } =20 - if (CheckedCount =3D=3D SIGNATURE_DATA_COUNTS (ListWalker) || DelType = =3D=3D DELETE_SIGNATURE_LIST_ONE) { + if (CheckedCount =3D=3D SIGNATURE_DATA_COUNTS (ListWalker) || DelType= =20 + =3D=3D Delete_Signature_List_One) { RemainingSize -=3D ListWalker->SignatureListSize; ListWalker =3D (EFI_SIGNATURE_LIST *)((UINT8 *)ListWalker + ListWalk= er->SignatureListSize); } else { @@ -3685,13 +3685,13 @@ LoadSignatureList ( goto ON_EXIT; } =20 - if (PrivateData->VariableName =3D=3D VARIABLE_DB) { + if (PrivateData->VariableName =3D=3D Variable_DB) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE); DstFormId =3D FORMID_SECURE_BOOT_DB_OPTION_FORM; - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBX) { + } else if (PrivateData->VariableName =3D=3D Variable_DBX) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1); DstFormId =3D FORMID_SECURE_BOOT_DBX_OPTION_FORM; - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBT) { + } else if (PrivateData->VariableName =3D=3D Variable_DBT) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2); DstFormId =3D FORMID_SECURE_BOOT_DBT_OPTION_FORM; } else { @@ -4216,11 +4216,11 @@ LoadSignatureData ( goto ON_EXIT; } =20 - if (PrivateData->VariableName =3D=3D VARIABLE_DB) { + if (PrivateData->VariableName =3D=3D Variable_DB) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE); - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBX) { + } else if (PrivateData->VariableName =3D=3D Variable_DBX) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1); - } else if (PrivateData->VariableName =3D=3D VARIABLE_DBT) { + } else if (PrivateData->VariableName =3D=3D Variable_DBT) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2); } else { goto ON_EXIT; @@ -4618,7 +4618,7 @@ SecureBootCallback ( // From DBX option to the level-1 form, display signature list. // case KEY_VALUE_FROM_DBX_TO_LIST_FORM: - Private->VariableName =3D VARIABLE_DBX; + Private->VariableName =3D Variable_DBX; LoadSignatureList ( Private, LABEL_SIGNATURE_LIST_START, @@ -4640,7 +4640,7 @@ SecureBootCallback ( ); =20 if (Key.UnicodeChar =3D=3D L'Y' || Key.UnicodeChar =3D=3D L'y') { - DeleteSignatureEx (Private, DELETE_SIGNATURE_LIST_ALL, IfrNvData->= CheckedDataCount); + DeleteSignatureEx (Private, Delete_Signature_List_All,=20 + IfrNvData->CheckedDataCount); } =20 LoadSignatureList ( @@ -4664,7 +4664,7 @@ SecureBootCallback ( ); =20 if (Key.UnicodeChar =3D=3D L'Y' || Key.UnicodeChar =3D=3D L'y') { - DeleteSignatureEx (Private, DELETE_SIGNATURE_LIST_ONE, IfrNvData->= CheckedDataCount); + DeleteSignatureEx (Private, Delete_Signature_List_One,=20 + IfrNvData->CheckedDataCount); } =20 LoadSignatureList ( @@ -4688,7 +4688,7 @@ SecureBootCallback ( ); =20 if (Key.UnicodeChar =3D=3D L'Y' || Key.UnicodeChar =3D=3D L'y') { - DeleteSignatureEx (Private, DELETE_SIGNATURE_DATA, IfrNvData->Chec= kedDataCount); + DeleteSignatureEx (Private, Delete_Signature_Data,=20 + IfrNvData->CheckedDataCount); } =20 LoadSignatureList ( diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigImpl.h b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Secu= reBootConfigImpl.h index 52ad91b002..e8ae992dd2 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.h +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCo +++ nfigImpl.h @@ -152,16 +152,16 @@ typedef struct { } HII_VENDOR_DEVICE_PATH; =20 typedef enum { - VARIABLE_DB, - VARIABLE_DBX, - VARIABLE_DBT, - VARIABLE_MAX + Variable_DB, + Variable_DBX, + Variable_DBT, + Variable_MAX } CURRENT_VARIABLE_NAME; =20 typedef enum { - DELETE_SIGNATURE_LIST_ALL, - DELETE_SIGNATURE_LIST_ONE, - DELETE_SIGNATURE_DATA + Delete_Signature_List_All, + Delete_Signature_List_One, + Delete_Signature_Data }SIGNATURE_DELETE_TYPE; =20 typedef struct { -- 2.13.2.windows.1