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.20; helo=mga02.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 58FD621962301 for ; Wed, 12 Sep 2018 18:05:59 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2018 18:05:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,367,1531810800"; d="scan'208";a="88293541" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 12 Sep 2018 18:04:02 -0700 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.319.2; Wed, 12 Sep 2018 18:04:02 -0700 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.319.2; Wed, 12 Sep 2018 18:04:01 -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; Thu, 13 Sep 2018 09:03:56 +0800 From: "Zhu, Yonghong" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [PATCH v1 1/1] BaseTools\GenFds: remove extra content Thread-Index: AQHUSVP18WiQuBBO5E6PfkqCfQeqmqTtZ8Ig Date: Thu, 13 Sep 2018 01:03:56 +0000 Message-ID: References: <2c6ed8a659f6fd60085ec373857cb9312c296551.1536612406.git.jaben.carsey@intel.com> In-Reply-To: <2c6ed8a659f6fd60085ec373857cb9312c296551.1536612406.git.jaben.carsey@intel.com> 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\GenFds: remove extra content 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: Thu, 13 Sep 2018 01:05:59 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -----Original Message----- From: Carsey, Jaben=20 Sent: Tuesday, September 11, 2018 6:16 AM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong ; Gao, Liming Subject: [PATCH v1 1/1] BaseTools\GenFds: remove extra content remove uncalled functions remove extra blank lines remove commented out code Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/GenFds/FdfParser.py | 56 -------------------- 1 file changed, 56 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source= /Python/GenFds/FdfParser.py index 7e1be659fca5..1f7d59bb51b0 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -1120,28 +1120,6 @@ class FdfParser: else: return False =20 - def __GetNextOp(self): - # Skip leading spaces, if exist. - self.__SkipWhiteSpace() - if self.__EndOfFile(): - return False - # Record the token start position, the position of the first non-s= pace char. - StartPos =3D self.CurrentOffsetWithinLine - while not self.__EndOfLine(): - TempChar =3D self.__CurrentChar() - # Try to find the end char that is not a space - if not str(TempChar).isspace(): - self.__GetOneChar() - else: - break - else: - return False - - if StartPos !=3D self.CurrentOffsetWithinLine: - self.__Token =3D self.__CurrentLine()[StartPos : self.CurrentO= ffsetWithinLine] - return True - else: - return False ## __GetNextGuid() method # # Get next token unit before a seperator @@ -1247,28 +1225,6 @@ class FdfParser: self.__UndoToken() return False =20 - ## __GetNextPcdName() method - # - # Get next PCD token space C name and PCD C name pair before a seper= ator - # If found, the decimal data is put into self.__Token - # - # @param self The object pointer - # @retval Tuple PCD C name and PCD token space C name pair - # - def __GetNextPcdName(self): - if not self.__GetNextWord(): - raise Warning("expected format of .", self.FileName, self.CurrentLineNumber) - pcdTokenSpaceCName =3D self.__Token - - if not self.__IsToken( "."): - raise Warning("expected format of .", self.FileName, self.CurrentLineNumber) - - if not self.__GetNextWord(): - raise Warning("expected format of .", self.FileName, self.CurrentLineNumber) - pcdCName =3D self.__Token - - return (pcdCName, pcdTokenSpaceCName) - def __GetNextPcdSettings(self): if not self.__GetNextWord(): raise Warning("expected format of .", self.FileName, self.CurrentLineNumber) @@ -3681,7 +3637,6 @@ class Fd= fParser: ModuleType.upper() + \ '.' + \ TemplateName.upper() ] =3D RuleObj -# self.Profile.RuleList.append(rule) return True =20 ## __GetModuleType() method @@ -4139,7 +4094,6 @@ class FdfParser: # @retval False Not able to find section statement # def __GetRuleEncapsulationSection(self, Rule): - if self.__IsKeyword( "COMPRESS"): Type =3D "PI_STD" if self.__IsKeyword("PI_STD") or self.__IsKeyword("PI_NONE"): @@ -4207,7 +4161,6 @@ class FdfParser: # @retval False Not able to find a VTF # def __GetVtf(self): - if not self.__GetNextToken(): return False =20 @@ -4279,7 +4232,6 @@ class FdfParser: # @retval False Not able to find a component # def __GetComponentStatement(self, VtfObj): - if not self.__IsKeyword("COMP_NAME"): return False =20 @@ -4413,7 +4365,6 @@ class FdfParser: # @retval False Not able to find a OptionROM # def __GetOptionRom(self): - if not self.__GetNextToken(): return False =20 @@ -4454,7 +4405,6 @@ class FdfParser: # @retval False Not able to find inf statement # def __GetOptRomInfStatement(self, Obj): - if not self.__IsKeyword( "INF"): return False =20 @@ -4557,7 +4507,6 @@ class FdfParser: # @retval False Not able to find FILE statement # def __GetOptRomFileStatement(self, Obj): - if not self.__IsKeyword( "FILE"): return False =20 @@ -4592,7 +4541,6 @@ class FdfParser: # @retval CapList List of Capsule in FD # def __GetCapInFd (self, FdName): - CapList =3D [] if FdName.upper() in self.Profile.FdDict: FdObj =3D self.Profile.FdDict[FdName.upper()] @@ -4615,7 +4563,6 @@ class FdfParser: # @param RefFvList referenced FV by section # def __GetReferencedFdCapTuple(self, CapObj, RefFdList =3D [], RefFvLis= t =3D []): - for CapsuleDataObj in CapObj.CapsuleDataList : if hasattr(CapsuleDataObj, 'FvName') and CapsuleDataObj.FvName= is not None and CapsuleDataObj.FvName.upper() not in RefFvList: RefFvList.append (CapsuleDataObj.FvName.upper()) @@ -4639,= 7 +4586,6 @@ class FdfParser: # @retval FvList list of FV in FD # def __GetFvInFd (self, FdName): - FvList =3D [] if FdName.upper() in self.Profile.FdDict: FdObj =3D self.Profile.FdDict[FdName.upper()] @@ -4662,7 +4608,6 @@ class FdfParser: # @param RefFvList referenced FV by section # def __GetReferencedFdFvTuple(self, FvObj, RefFdList =3D [], RefFvList = =3D []): - for FfsObj in FvObj.FfsList: if isinstance(FfsObj, FfsFileStatement.FileStatement): if FfsObj.FvName is not None and FfsObj.FvName.upper() not= in RefFvList: @@ -4682,7 +4627,6 @@ class FdfParser: # @param FvList referenced FV by section # def __GetReferencedFdFvTupleFromSection(self, FfsFile, FdList =3D [], = FvList =3D []): - SectionStack =3D [] SectionStack.extend(FfsFile.SectionList) while SectionStack !=3D []: -- 2.16.2.windows.1