From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 70F05A04BA;
	Thu, 17 Sep 2020 11:33:47 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 7F21D1D5C7;
	Thu, 17 Sep 2020 11:33:46 +0200 (CEST)
Received: from mailgw01.pantheon.sk (mailgw01.pantheon.sk [46.229.239.26])
 by dpdk.org (Postfix) with ESMTP id 1089C1D5AF
 for <dev@dpdk.org>; Thu, 17 Sep 2020 11:33:45 +0200 (CEST)
Received: from mailgw01.pantheon.sk (localhost.localdomain [127.0.0.1])
 by mailgw01.pantheon.sk (Proxmox) with ESMTP id C698C2021B1;
 Thu, 17 Sep 2020 11:33:44 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech;
 h=cc:cc:content-transfer-encoding:content-type:content-type
 :date:from:from:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=dkim; bh=yQfY/8H/ZsHpQs0+yVfm
 t0E5rgn7G6I5heOFVtw0u7g=; b=iWR8On7rfXzMPP1OTwGHO2YxInaEffjxLqGu
 fyiff5CJzbnnVO7EtA1bCkO1JbpTTRV76EPRQZBMLRHQzGKvlH/MP0fJlj4oQvn8
 48nwWVAeo14xfO7fq7yDXNLHEvZ82q7pyWRrHPd832PP2jR5TyUFUEUAb1vx9xrx
 T2AIoooluuNcZeoOprQ72laZ+PVhj+ozmHs5MJ6HRB0loAE10ny1IGT2AE02Krpr
 5vYAFY2FOIHRKPYh4DjublGxElrPGoWG8FGst1dPq84NchVwlwZj0HN3Znj+LRhd
 9KgwtQ2xIItTrtlA+LT7H+uMCcCpnUbae+Z+USER3cYvEV2Nvg==
From: =?iso-8859-2?Q?Juraj_Linke=B9?= <juraj.linkes@pantheon.tech>
To: Dharmik Thakkar <dharmik.thakkar@arm.com>, Thomas Monjalon
 <thomas@monjalon.net>
CC: "dev@dpdk.org" <dev@dpdk.org>, "nd@arm.com" <nd@arm.com>
Thread-Topic: [dpdk-dev] [PATCH 1/2] config/arm: avoid variable reuse
Thread-Index: AQHWeySw3rWduZH6sEatT+sA5KZE+qlstF3w
Date: Thu, 17 Sep 2020 09:33:44 +0000
Message-ID: <c625bc46782e44c7a16cb5b8629c869f@pantheon.tech>
References: <20200825211317.8358-1-dharmik.thakkar@arm.com>
In-Reply-To: <20200825211317.8358-1-dharmik.thakkar@arm.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.101.4.10]
Content-Type: text/plain; charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dharmik Thakkar
> Sent: Tuesday, August 25, 2020 11:13 PM
> To: Thomas Monjalon <thomas@monjalon.net>
> Cc: dev@dpdk.org; nd@arm.com; Dharmik Thakkar
> <dharmik.thakkar@arm.com>
> Subject: [dpdk-dev] [PATCH 1/2] config/arm: avoid variable reuse
>=20
> Rename 'machine' to 'machine_properties' in config/arm/meson.build since
> 'machine' is previously being used in config/meson.build
>=20

Wasn't the same variable name used by design? That is update the variable a=
ccording to what's in config/arm/meson.build so that the new updated variab=
le would be used in config/meson.build after that?

> Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>  config/arm/meson.build | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>=20
> 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)
>=20
> -	machine =3D []
> +	machine_properties =3D []
>  	cmd_generic =3D ['generic', '', '', 'default', '']
>  	cmd_output =3D cmd_generic # Set generic by default
>  	machine_args =3D [] # Clear previous machine args
>  	if arm_force_default_march and not meson.is_cross_build()
> -		machine =3D impl_generic
> +		machine_properties =3D impl_generic
>  		impl_pn =3D 'default'
>  	elif not meson.is_cross_build()
>  		# The script returns ['Implementer', 'Variant', 'Architecture', @@
> -158,9 +158,9 @@ else
>  			cmd_output =3D cmd.stdout().to_lower().strip().split(' ')
>  		endif
>  		# Set to generic if variable is not found
> -		machine =3D get_variable('impl_' + cmd_output[0], ['generic'])
> -		if machine[0] =3D=3D 'generic'
> -			machine =3D impl_generic
> +		machine_properties =3D get_variable('impl_' + cmd_output[0],
> ['generic'])
> +		if machine_properties[0] =3D=3D 'generic'
> +			machine_properties =3D impl_generic
>  			cmd_output =3D cmd_generic
>  		endif
>  		impl_pn =3D cmd_output[3]
> @@ -170,7 +170,7 @@ else
>  	else
>  		impl_id =3D meson.get_cross_property('implementor_id',
> 'generic')
>  		impl_pn =3D meson.get_cross_property('implementor_pn',
> 'default')
> -		machine =3D get_variable('impl_' + impl_id)
> +		machine_properties =3D get_variable('impl_' + impl_id)
>  	endif
>=20
>  	# Apply Common Defaults. These settings may be overwritten by
> machine @@ -181,14 +181,14 @@ else
>  		endif
>  	endforeach
>=20
> -	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
>=20
> -	foreach marg: machine[2]
> +	foreach marg: machine_properties[2]
>  		if marg[0] =3D=3D impl_pn
>  			foreach flag: marg[1]
>  				if cc.has_argument(flag)
> --
> 2.17.1
>=20