From nobody Mon Feb 9 12:14:50 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1524868455210445.8721172561303; Fri, 27 Apr 2018 15:34:15 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1AF96203B927E; Fri, 27 Apr 2018 15:33:08 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 51A372034C8CF for ; Fri, 27 Apr 2018 15:33:02 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Apr 2018 15:33:01 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga002.jf.intel.com with ESMTP; 27 Apr 2018 15:32:59 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,336,1520924400"; d="scan'208";a="54252825" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Fri, 27 Apr 2018 15:32:33 -0700 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [edk2] [PATCH v1 19/42] BaseTools: AutoGen - refactor out functions only called in __init__ X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 16 +---------= ------ 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py b/B= aseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py index 2f8f4fac23f8..0b4677b62a73 100644 --- a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py +++ b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py @@ -244,16 +244,12 @@ class VAR_CHECK_PCD_VALID_OBJ(object): self.Type =3D 1 self.Length =3D 0 # Length include this header self.VarOffset =3D VarOffset - self.StorageWidth =3D 0 self.PcdDataType =3D PcdDataType.strip() self.rawdata =3D data self.data =3D set() - self.ValidData =3D True - self.updateStorageWidth() - - def updateStorageWidth(self): try: self.StorageWidth =3D MAX_SIZE_TYPE[self.PcdDataType] + self.ValidData =3D True except: self.StorageWidth =3D 0 self.ValidData =3D False @@ -265,9 +261,6 @@ class VAR_CHECK_PCD_VALID_LIST(VAR_CHECK_PCD_VALID_OBJ): def __init__(self, VarOffset, validlist, PcdDataType): super(VAR_CHECK_PCD_VALID_LIST, self).__init__(VarOffset, validlis= t, PcdDataType) self.Type =3D 1 - self.update_data() - self.update_size() - def update_data(self): valid_num_list =3D [] data_list =3D [] for item in self.rawdata: @@ -283,8 +276,6 @@ class VAR_CHECK_PCD_VALID_LIST(VAR_CHECK_PCD_VALID_OBJ): =20 =20 self.data =3D set(data_list) - =20 - def update_size(self): self.Length =3D 5 + len(self.data) * self.StorageWidth =20 =20 @@ -292,9 +283,6 @@ class VAR_CHECK_PCD_VALID_RANGE(VAR_CHECK_PCD_VALID_OBJ= ): def __init__(self, VarOffset, validrange, PcdDataType): super(VAR_CHECK_PCD_VALID_RANGE, self).__init__(VarOffset, validra= nge, PcdDataType) self.Type =3D 2 - self.update_data() - self.update_size() - def update_data(self): RangeExpr =3D "" data_list =3D [] i =3D 0 @@ -308,8 +296,6 @@ class VAR_CHECK_PCD_VALID_RANGE(VAR_CHECK_PCD_VALID_OBJ= ): for obj in rangelist.pop(): data_list.append((obj.start, obj.end)) self.data =3D set(data_list) - =20 - def update_size(self): self.Length =3D 5 + len(self.data) * 2 * self.StorageWidth =20 =20 --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel