From nobody Tue Apr 30 23:28:36 2024 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 1525869106898855.5278840422882; Wed, 9 May 2018 05:31:46 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9B3DE2096AEC6; Wed, 9 May 2018 05:31:45 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 14AF82034861F for ; Wed, 9 May 2018 05:31:43 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 05:31:43 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga003.jf.intel.com with ESMTP; 09 May 2018 05:31:42 -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.93; helo=mga11.intel.com; envelope-from=yonghong.zhu@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,381,1520924400"; d="scan'208";a="49477210" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Wed, 9 May 2018 20:31:39 +0800 Message-Id: <1525869099-11152-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [Patch] BaseTools: Remove the redundant code 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: , 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" the ArraySize and Array already be got in line 1093, so this code are redundant. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenC.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Pyt= hon/AutoGen/GenC.py index 6192e86..40a343c 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1096,20 +1096,10 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, P= cd): # Long term we need PCD macros that work in assembly # elif Pcd.Type !=3D TAB_PCDS_FIXED_AT_BUILD and Pcd.DatumType in TA= B_PCD_NUMERIC_TYPES_VOID: Value =3D "((%s)%s)" % (Pcd.DatumType, Value) =20 - if Pcd.DatumType not in TAB_PCD_NUMERIC_TYPES_VOID: - # handle structure PCD - if Pcd.MaxDatumSize is None or Pcd.MaxDatumSize =3D=3D '': - EdkLogger.error("build", AUTOGEN_ERROR, - "Unknown [MaxDatumSize] of PCD [%s.%s]" % = (Pcd.TokenSpaceGuidCName, TokenCName), - ExtraData=3D"[%s]" % str(Info)) - - ArraySize =3D int(Pcd.MaxDatumSize, 0) - Array =3D '[%d]' % ArraySize - if Pcd.Type =3D=3D TAB_PCDS_PATCHABLE_IN_MODULE: PcdValueName =3D '_PCD_PATCHABLE_VALUE_' + TokenCName else: PcdValueName =3D '_PCD_VALUE_' + TokenCName =20 --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel