From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.31688.1578879778182567494 for ; Sun, 12 Jan 2020 17:42:58 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: bob.c.feng@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jan 2020 17:42:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,427,1571727600"; d="scan'208";a="304711874" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 12 Jan 2020 17:42:56 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 12 Jan 2020 17:42:55 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 13 Jan 2020 09:42:53 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Mon, 13 Jan 2020 09:42:53 +0800 From: "Bob Feng" To: "Fan, ZhijuX" , "devel@edk2.groups.io" CC: "Gao, Liming" Subject: Re: [PATCH V3] BaseTools:Change the case rules for ECC check pointer names Thread-Topic: [PATCH V3] BaseTools:Change the case rules for ECC check pointer names Thread-Index: AdXHkSvYboPrJjYkTDyV+NZr/5RvrwCIZJCw Date: Mon, 13 Jan 2020 01:42:53 +0000 Message-ID: <2cccd8ac59e640a0ad48046f97db83a9@intel.com> References: In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: Fan, ZhijuX=20 Sent: Friday, January 10, 2020 4:38 PM To: devel@edk2.groups.io Cc: Gao, Liming ; Feng, Bob C Subject: [PATCH V3] BaseTools:Change the case rules for ECC check pointer n= ames BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2087 In CryptHkdf.c line 42 EVP_PKEY_CTX *pHkdfCtx; Variable pHkdfCtx begins with lower case 'p', which should be acceptable be= cause it it is a pointer. (Refer to CCS_2_1_Draft, 4.3.3.3) So ECC tool should be improved to handle issues like this. Cc: Liming Gao Cc: Bob Feng Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Ecc/Check.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) update the copyright to 2020 diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python= /Ecc/Check.py index b68cecddfd..0fdc7e35c1 100644 --- a/BaseTools/Source/Python/Ecc/Check.py +++ b/BaseTools/Source/Python/Ecc/Check.py @@ -1,7 +1,7 @@ ## @file # This file is used to define checkpoints used by ECC tool # -# Copyright= (c) 2008 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2020, Intel Corporation. All rights=20 +reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import = absolute_import @@ -1469,13 +1469,14 @@ class Check(object): EdkLogger.quiet("Checking naming convention of variable name .= ..") Pattern =3D re.compile(r'^[A-Zgm]+\S*[a-z]\S*$') =20 - SqlCommand =3D """select ID, Name from %s where Model =3D %s""= " % (FileTable, MODEL_IDENTIFIER_VARIABLE) + SqlCommand =3D """select ID, Name, Modifier from %s where=20 + Model =3D %s""" % (FileTable, MODEL_IDENTIFIER_VARIABLE) RecordSet =3D EccGlobalData.gDb.TblFile.Exec(SqlCommand) for Record in RecordSet: Var =3D Record[1] + Modifier =3D Record[2] if Var.startswith('CONST'): Var =3D Var[5:].lstrip() - if not Pattern.match(Var): + if not Pattern.match(Var) and not (Modifier.endswith('*') = and Var.startswith('p')): if not EccGlobalData.gException.IsException(ERROR_NAMI= NG_CONVENTION_CHECK_VARIABLE_NAME, Record[1]): EccGlobalData.gDb.TblReport.Insert(ERROR_NAMING_CO= NVENTION_CHECK_VARIABLE_NAME, OtherMsg=3D"The variable name [%s] does not f= ollow the rules" % (Record[1]), BelongsToTable=3DFileTable, BelongsToItem= =3DRecord[0]) =20 -- 2.14.1.windows.1