From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.3487.1585823383293959062 for ; Thu, 02 Apr 2020 03:29:43 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) 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 D2EF231B; Thu, 2 Apr 2020 03:29:42 -0700 (PDT) Received: from [10.37.8.12] (unknown [10.37.8.12]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2D5953F71E; Thu, 2 Apr 2020 03:29:42 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH 5/5] ArmPkg/ArmMmuLib: drop unused TT_ATTR_INDX_INVALID CPP symbol To: devel@edk2.groups.io, leif@nuviainc.com, Ard Biesheuvel References: <20200328104321.8668-1-ard.biesheuvel@linaro.org> <20200328104321.8668-6-ard.biesheuvel@linaro.org> <20200402102308.GM7468@vanye> From: "Ard Biesheuvel" Message-ID: <24502c11-cab8-f00b-6c3f-e4705f315aea@arm.com> Date: Thu, 2 Apr 2020 12:29:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200402102308.GM7468@vanye> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 4/2/20 12:23 PM, Leif Lindholm via groups.io wrote: > On Sat, Mar 28, 2020 at 11:43:21 +0100, Ard Biesheuvel wrote: >> TT_ATTR_INDX_INVALID is #define'd but never used so drop it. >> >> Signed-off-by: Ard Biesheuvel >> --- >> ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 3 --- >> 1 file changed, 3 deletions(-) >> >> diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c b/ArmPkg= /Library/ArmMmuLib/AArch64/ArmMmuLibCore.c >> index a82596d290f1..222ff817956f 100644 >> --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c >> +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c >> @@ -19,9 +19,6 @@ >> #include >> #include >> =20 >> -// We use this index definition to define an invalid block entry >> -#define TT_ATTR_INDX_INVALID ((UINT32)~0) >> - >=20 > Since this is separately defined also in > ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c (=C2=A3"$%^=C2=A3"$?!?!?) > could this patch be tweaked to instead "consolidate" the definitions > to a central location, like ArmPkg/Include/Chipset/AArch64Mmu.h where > all of the other TT_ATTR_INDX_ definitions live? >=20 That would imply that this value is somehow architected, which it is not. ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c is the only remaining user of this=20 constant, and it only has meaning within the context of the routines=20 therein.