From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A0F5A04B1; Tue, 25 Aug 2020 23:14:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54497FEB; Tue, 25 Aug 2020 23:14:02 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id DF75923D for ; Tue, 25 Aug 2020 23:13:58 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 23D8E1FB; Tue, 25 Aug 2020 14:13:58 -0700 (PDT) Received: from localhost.localdomain (2p2660v4-1.austin.arm.com [10.118.12.95]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1C4DD3F71F; Tue, 25 Aug 2020 14:13:58 -0700 (PDT) From: Dharmik Thakkar To: Thomas Monjalon Cc: dev@dpdk.org, nd@arm.com, Dharmik Thakkar Date: Tue, 25 Aug 2020 16:13:16 -0500 Message-Id: <20200825211317.8358-1-dharmik.thakkar@arm.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH 1/2] config/arm: avoid variable reuse X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Rename 'machine' to 'machine_properties' in config/arm/meson.build since 'machine' is previously being used in config/meson.build Signed-off-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang --- config/arm/meson.build | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 8728051d5e38..e89ecdc4ccd2 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -141,12 +141,12 @@ else dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128) dpdk_conf.set('RTE_ARCH_ARM64', 1) - machine = [] + machine_properties = [] cmd_generic = ['generic', '', '', 'default', ''] cmd_output = cmd_generic # Set generic by default machine_args = [] # Clear previous machine args if arm_force_default_march and not meson.is_cross_build() - machine = impl_generic + machine_properties = impl_generic impl_pn = 'default' elif not meson.is_cross_build() # The script returns ['Implementer', 'Variant', 'Architecture', @@ -158,9 +158,9 @@ else cmd_output = cmd.stdout().to_lower().strip().split(' ') endif # Set to generic if variable is not found - machine = get_variable('impl_' + cmd_output[0], ['generic']) - if machine[0] == 'generic' - machine = impl_generic + machine_properties = get_variable('impl_' + cmd_output[0], ['generic']) + if machine_properties[0] == 'generic' + machine_properties = impl_generic cmd_output = cmd_generic endif impl_pn = cmd_output[3] @@ -170,7 +170,7 @@ else else impl_id = meson.get_cross_property('implementor_id', 'generic') impl_pn = meson.get_cross_property('implementor_pn', 'default') - machine = get_variable('impl_' + impl_id) + machine_properties = get_variable('impl_' + impl_id) endif # Apply Common Defaults. These settings may be overwritten by machine @@ -181,14 +181,14 @@ else endif endforeach - message('Implementer : ' + machine[0]) - foreach flag: machine[1] + message('Implementer : ' + machine_properties[0]) + foreach flag: machine_properties[1] if flag.length() > 0 dpdk_conf.set(flag[0], flag[1]) endif endforeach - foreach marg: machine[2] + foreach marg: machine_properties[2] if marg[0] == impl_pn foreach flag: marg[1] if cc.has_argument(flag) -- 2.17.1