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=yonghong.zhu@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 70BE4210F52AC for ; Sun, 19 Aug 2018 20:33:37 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Aug 2018 20:33:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,263,1531810800"; d="scan'208";a="66272603" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga007.jf.intel.com with ESMTP; 19 Aug 2018 20:33:35 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 19 Aug 2018 20:33:36 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 19 Aug 2018 20:33:36 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.150]) with mapi id 14.03.0319.002; Mon, 20 Aug 2018 11:33:34 +0800 From: "Zhu, Yonghong" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [PATCH v1 1/1] BaseTools: remove unused setter functions Thread-Index: AQHUNkXX1V6Y1fHgZE2bYYeOXp4u56TIAIFA Date: Mon, 20 Aug 2018 03:33:33 +0000 Message-ID: References: In-Reply-To: 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 v1 1/1] BaseTools: remove unused setter functions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2018 03:33:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: Carsey, Jaben=20 Sent: Saturday, August 18, 2018 12:18 AM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong ; Gao, Liming Subject: [PATCH v1 1/1] BaseTools: remove unused setter functions Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/DecBuildData.py | 17 +---------- BaseTo= ols/Source/Python/Workspace/DscBuildData.py | 17 +---------- BaseTools/Sou= rce/Python/Workspace/InfBuildData.py | 30 ++------------------ 3 files changed, 4 insertions(+), 60 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTools/= Source/Python/Workspace/DecBuildData.py index 7eeca9524529..45beaebc63ef 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -116,21 +116,6 @@ class DecBuildData(PackageBuildClassObject): def _GetArch(self): return self._Arch =20 - ## Set architecture - # - # Changing the default ARCH to another may affect all other informat= ion - # because all information in a platform may be ARCH-related. That's - # why we need to clear all internal used members, in order to cause al= l - # information to be re-retrieved. - # - # @param Value The value of ARCH - # - def _SetArch(self, Value): - if self._Arch =3D=3D Value: - return - self._Arch =3D Value - self._Clear() - ## Retrieve all information in [Defines] section # # (Retriving all [Defines] information in one-shot is just to save t= ime.) @@ -469,7 +454,7 @@ class DecBuildData(PackageBuildClassObject): =20 =20 _Macros =3D property(_GetMacros) - Arch =3D property(_GetArch, _SetArch) + Arch =3D property(_GetArch) PackageName =3D property(_GetPackageName) Guid =3D property(_GetFileGuid) Version =3D property(_GetVersion) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index c7f07f464646..a4ad53ee1558 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -308,21 +308,6 @@ class DscBuildData(PlatformBuildClassObject): def _GetArch(self): return self._Arch =20 - ## Set architecture - # - # Changing the default ARCH to another may affect all other informat= ion - # because all information in a platform may be ARCH-related. That's - # why we need to clear all internal used members, in order to cause al= l - # information to be re-retrieved. - # - # @param Value The value of ARCH - # - def _SetArch(self, Value): - if self._Arch =3D=3D Value: - return - self._Arch =3D Value - self._Clear() - ## Retrieve all information in [Defines] section # # (Retriving all [Defines] information in one-shot is just to save t= ime.) @@ -2849,7 +2834,7 @@ class DscBuildData(PlatformBuildClassObject): self._DecPcds, self._GuidDict =3D GetDeclaredPcd(self, self._B= db, self._Arch, self._Target, self._Toolchain, PkgSet) return self._DecPcds _Macros =3D property(_GetMacros) - Arch =3D property(_GetArch, _SetArch) + Arch =3D property(_GetArch) Platform =3D property(_GetPlatformName) PlatformName =3D property(_GetPlatformName) Guid =3D property(_GetFileGuid) diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/= Source/Python/Workspace/InfBuildData.py index 29e68aeb3bf3..8bff96b14942 100644 --- a/BaseTools/Source/Python/Workspace/InfBuildData.py +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py @@ -173,36 +173,10 @@ class InfBuildData(ModuleBuildClassObject): def _GetArch(self): return self._Arch =20 - ## Set architecture - # - # Changing the default ARCH to another may affect all other informat= ion - # because all information in a platform may be ARCH-related. That's - # why we need to clear all internal used members, in order to cause al= l - # information to be re-retrieved. - # - # @param Value The value of ARCH - # - def _SetArch(self, Value): - if self._Arch =3D=3D Value: - return - self._Arch =3D Value - self._Clear() - ## Return the name of platform employing this module def _GetPlatform(self): return self._Platform =20 - ## Change the name of platform employing this module - # - # Changing the default name of platform to another may affect some i= nformation - # because they may be PLATFORM-related. That's why we need to clear al= l internal - # used members, in order to cause all information to be re-retrieved. - # - def _SetPlatform(self, Value): - if self._Platform =3D=3D Value: - return - self._Platform =3D Value - self._Clear() def _GetHeaderComments(self): if not self._HeaderComments: self._HeaderComments =3D [] @@ -1158,8 +1132,8 @@ class InfBuildData(ModuleBuildClassObject): return False =20 _Macros =3D property(_GetMacros) - Arch =3D property(_GetArch, _SetArch) - Platform =3D property(_GetPlatform, _SetPlatform) + Arch =3D property(_GetArch) + Platform =3D property(_GetPlatform) =20 HeaderComments =3D property(_GetHeaderComments) TailComments =3D property(_GetTailComments) -- 2.16.2.windows.1