[edk2-devel] [edk2 PATCH] MdePkg: Use same ProcessorBind symbol define for RISCV64

Xue, Gavin gavin.xue at intel.com
Tue Jul 4 09:39:12 UTC 2023


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.falcato at gmail.com> 
Sent: Tuesday, July 4, 2023 1:02 AM
To: devel at edk2.groups.io; Kinney, Michael D <michael.d.kinney at intel.com>
Cc: Xue, Gavin <gavin.xue at intel.com>; sunilvl at ventanamicro.com; Warkentin, Andrei <andrei.warkentin at intel.com>; Wang, Yimin <yimin.wang at intel.com>; Sheng, Alan <alan.sheng at 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.kinney at 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/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list