From: "Zhu, Yonghong" <yonghong.zhu@intel.com>
To: "Carsey, Jaben" <jaben.carsey@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Gao, Liming" <liming.gao@intel.com>,
"Zhu, Yonghong" <yonghong.zhu@intel.com>
Subject: Re: [PATCH v1 1/1] BaseTools: remove unused setter functions
Date: Mon, 20 Aug 2018 03:33:33 +0000 [thread overview]
Message-ID: <B9726D6DCCFB8B4CA276A9169B02216D520EA69A@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <eda05615892aede429c66eabd1d55f7717f70f62.1534522638.git.jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Best Regards,
Zhu Yonghong
-----Original Message-----
From: Carsey, Jaben
Sent: Saturday, August 18, 2018 12:18 AM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong <yonghong.zhu@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [PATCH v1 1/1] BaseTools: remove unused setter functions
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
---
BaseTools/Source/Python/Workspace/DecBuildData.py | 17 +---------- BaseTools/Source/Python/Workspace/DscBuildData.py | 17 +---------- BaseTools/Source/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
- ## Set architecture
- #
- # Changing the default ARCH to another may affect all other information
- # 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 all
- # information to be re-retrieved.
- #
- # @param Value The value of ARCH
- #
- def _SetArch(self, Value):
- if self._Arch == Value:
- return
- self._Arch = Value
- self._Clear()
-
## Retrieve all information in [Defines] section
#
# (Retriving all [Defines] information in one-shot is just to save time.)
@@ -469,7 +454,7 @@ class DecBuildData(PackageBuildClassObject):
_Macros = property(_GetMacros)
- Arch = property(_GetArch, _SetArch)
+ Arch = property(_GetArch)
PackageName = property(_GetPackageName)
Guid = property(_GetFileGuid)
Version = 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
- ## Set architecture
- #
- # Changing the default ARCH to another may affect all other information
- # 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 all
- # information to be re-retrieved.
- #
- # @param Value The value of ARCH
- #
- def _SetArch(self, Value):
- if self._Arch == Value:
- return
- self._Arch = Value
- self._Clear()
-
## Retrieve all information in [Defines] section
#
# (Retriving all [Defines] information in one-shot is just to save time.)
@@ -2849,7 +2834,7 @@ class DscBuildData(PlatformBuildClassObject):
self._DecPcds, self._GuidDict = GetDeclaredPcd(self, self._Bdb, self._Arch, self._Target, self._Toolchain, PkgSet)
return self._DecPcds
_Macros = property(_GetMacros)
- Arch = property(_GetArch, _SetArch)
+ Arch = property(_GetArch)
Platform = property(_GetPlatformName)
PlatformName = property(_GetPlatformName)
Guid = 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
- ## Set architecture
- #
- # Changing the default ARCH to another may affect all other information
- # 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 all
- # information to be re-retrieved.
- #
- # @param Value The value of ARCH
- #
- def _SetArch(self, Value):
- if self._Arch == Value:
- return
- self._Arch = Value
- self._Clear()
-
## Return the name of platform employing this module
def _GetPlatform(self):
return self._Platform
- ## Change the name of platform employing this module
- #
- # Changing the default name of platform to another may affect some information
- # because they may be PLATFORM-related. That's why we need to clear all internal
- # used members, in order to cause all information to be re-retrieved.
- #
- def _SetPlatform(self, Value):
- if self._Platform == Value:
- return
- self._Platform = Value
- self._Clear()
def _GetHeaderComments(self):
if not self._HeaderComments:
self._HeaderComments = []
@@ -1158,8 +1132,8 @@ class InfBuildData(ModuleBuildClassObject):
return False
_Macros = property(_GetMacros)
- Arch = property(_GetArch, _SetArch)
- Platform = property(_GetPlatform, _SetPlatform)
+ Arch = property(_GetArch)
+ Platform = property(_GetPlatform)
HeaderComments = property(_GetHeaderComments)
TailComments = property(_GetTailComments)
--
2.16.2.windows.1
prev parent reply other threads:[~2018-08-20 3:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1534522638.git.jaben.carsey@intel.com>
2018-08-17 16:17 ` [PATCH v1 1/1] BaseTools: remove unused setter functions Jaben Carsey
2018-08-20 3:33 ` Zhu, Yonghong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B9726D6DCCFB8B4CA276A9169B02216D520EA69A@SHSMSX103.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox