From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.6900.1578639685594589096 for ; Thu, 09 Jan 2020 23:01:25 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: bob.c.feng@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 23:01:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,415,1571727600"; d="scan'208";a="212155711" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 09 Jan 2020 23:01:24 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 9 Jan 2020 23:01:25 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 9 Jan 2020 23:01:24 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.197]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.203]) with mapi id 14.03.0439.000; Fri, 10 Jan 2020 15:01:22 +0800 From: "Bob Feng" To: "Fan, ZhijuX" , "devel@edk2.groups.io" CC: "Gao, Liming" Subject: Re: [PATCH V2] BaseTools:Change the case rules for ECC check pointer names Thread-Topic: [PATCH V2] BaseTools:Change the case rules for ECC check pointer names Thread-Index: AdXHbO2S6i2Q7Y0OSkylu8I7Pm99owAFsu5Q Date: Fri, 10 Jan 2020 07:01:21 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D1615A1B13@SHSMSX104.ccr.corp.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.40] 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 Please update the copyright to 2020 Thanks, Bob -----Original Message----- From: Fan, ZhijuX=20 Sent: Friday, January 10, 2020 12:18 PM To: devel@edk2.groups.io Cc: Gao, Liming ; Feng, Bob C Subject: [PATCH V2] 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python= /Ecc/Check.py index 2180818609..f927d8e4d3 100644 --- a/BaseTools/Source/Python/Ecc/Check.py +++ b/BaseTools/Source/Python/Ecc/Check.py @@ -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