Hi Pedro,

There are 3 different include guard names for ProcessorBind.h file.
AArch64/Arm/Ebc/Ia32/X64 use __PROCESSOR_BIND_H__ (start/end with 2 underscore 
characters).
RISCV64 uses PROCESSOR_BIND_H__ (end with 2 underscore)
LoongArch64 uses PROCESSOR_BIND_H_ (end with  1 underscore)

From the code rule of uniform style, I think it is also a necessary change to
same include guard name.
If you still think we shouldn't have the change, I am okay to close this patch. 
Thanks.

Best regards,
Gavin

-----Original Message-----
From: Pedro Falcato <pedro.falc...@gmail.com> 
Sent: Tuesday, July 4, 2023 1:02 AM
To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kin...@intel.com>
Cc: Xue, Gavin <gavin....@intel.com>; suni...@ventanamicro.com; Warkentin, 
Andrei <andrei.warken...@intel.com>; Wang, Yimin <yimin.w...@intel.com>; Sheng, 
Alan <alan.sh...@intel.com>
Subject: Re: [edk2-devel] [edk2 PATCH] MdePkg: Use same ProcessorBind symbol 
define for RISCV64

On Fri, Jun 30, 2023 at 5:59 PM Michael D Kinney
<michael.d.kin...@intel.com> wrote:
>
> Using the same include guard define name is preferred.
>
> Why was anything other than that considered?

I don't see the point of making the include guard an actual part of
the "API". Consumers should not depend on it being named $WHATEVER.
That is a hack.
Include guards are an implementation detail and making that stable
actively stops you from doing things like using #pragma once or fixing
the __DOUBLE_UNDERSCORE_H__ stuff.
So I would vote for not changing this, downstream consumers that rely
on __PROCESSOR_BIND_H__ should be fixed, downstream.

-- 
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106655): https://edk2.groups.io/g/devel/message/106655
Mute This Topic: https://groups.io/mt/99567569/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to