* [PATCH] xen/arm64: efibind: fix MISRA C 2012 Directive 4.10 violation
@ 2022-08-01 10:43 Xenia Ragiadakou
2022-08-01 11:02 ` Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Xenia Ragiadakou @ 2022-08-01 10:43 UTC (permalink / raw)
To: xen-devel
Cc: Stefano Stabellini, Julien Grall, Bertrand Marquis, Volodymyr Babchuk
Prevent header file from being included more than once by adding ifndef guard.
Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
---
xen/arch/arm/include/asm/arm64/efibind.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xen/arch/arm/include/asm/arm64/efibind.h b/xen/arch/arm/include/asm/arm64/efibind.h
index 2b0bf40bf2..cdbedf99d2 100644
--- a/xen/arch/arm/include/asm/arm64/efibind.h
+++ b/xen/arch/arm/include/asm/arm64/efibind.h
@@ -17,6 +17,9 @@ Revision History
--*/
+#ifndef __ASM_ARM64_EFIBIND_H__
+#define __ASM_ARM64_EFIBIND_H__
+
#ifndef __GNUC__
#pragma pack()
#endif
@@ -205,6 +208,8 @@ typedef uint64_t UINTN;
#endif
+#endif /* __ASM_ARM64_EFIBIND_H__ */
+
/*
* Local variables:
* mode: C
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xen/arm64: efibind: fix MISRA C 2012 Directive 4.10 violation
2022-08-01 10:43 [PATCH] xen/arm64: efibind: fix MISRA C 2012 Directive 4.10 violation Xenia Ragiadakou
@ 2022-08-01 11:02 ` Jan Beulich
2022-08-01 11:35 ` Xenia Ragiadakou
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2022-08-01 11:02 UTC (permalink / raw)
To: Xenia Ragiadakou
Cc: Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk, xen-devel
On 01.08.2022 12:43, Xenia Ragiadakou wrote:
> Prevent header file from being included more than once by adding ifndef guard.
If such a change is to be made, please also adjust the x86-64 instance of
the header.
However, these headers are inherited from the gnu-efi package, and hence
should see as little customization as possible (you may have noticed
that we didn't even correct the bogus "Module Name:" value in the x86-64
header). While for this particular change I'm not outright opposed, such
an exception to the usual handling would want recording in the
description. Actually - at least the x86-64 header has meanwhile gained
a guard in gnu-efi, so that one likely will want importing instead of
adding a custom one. (I'm looking only at 3.0.14, which I have readily
available - there may be a guard even for aarch64 in an up-to-date
version, so please double check.)
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xen/arm64: efibind: fix MISRA C 2012 Directive 4.10 violation
2022-08-01 11:02 ` Jan Beulich
@ 2022-08-01 11:35 ` Xenia Ragiadakou
0 siblings, 0 replies; 3+ messages in thread
From: Xenia Ragiadakou @ 2022-08-01 11:35 UTC (permalink / raw)
To: Jan Beulich
Cc: Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk, xen-devel
On 8/1/22 14:02, Jan Beulich wrote:
> On 01.08.2022 12:43, Xenia Ragiadakou wrote:
>> Prevent header file from being included more than once by adding ifndef guard.
>
> If such a change is to be made, please also adjust the x86-64 instance of
> the header.
>
> However, these headers are inherited from the gnu-efi package, and hence
> should see as little customization as possible (you may have noticed
> that we didn't even correct the bogus "Module Name:" value in the x86-64
> header). While for this particular change I'm not outright opposed, such
> an exception to the usual handling would want recording in the
> description. Actually - at least the x86-64 header has meanwhile gained
> a guard in gnu-efi, so that one likely will want importing instead of
> adding a custom one. (I'm looking only at 3.0.14, which I have readily
> available - there may be a guard even for aarch64 in an up-to-date
> version, so please double check.)
>
Ok, this makes sense.
The gnu-efi header for x86_64 is guarded with X86_64_EFI_BIND. For
arm64, efibind header does not have ifndef guard (3.0.14 is the latest tag).
So, I will put X86_64_EFI_BIND and AARCH64_EFI_BIND, in the same way as
it is done in gnu-efi (that is without following empty line and without
comment following endif).
--
Xenia
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-01 11:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01 10:43 [PATCH] xen/arm64: efibind: fix MISRA C 2012 Directive 4.10 violation Xenia Ragiadakou
2022-08-01 11:02 ` Jan Beulich
2022-08-01 11:35 ` Xenia Ragiadakou
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.