xen: add inclusion guards

MISRA C Directive 4.10 states that:
"Precautions shall be taken in order to prevent the contents of a
header file being included more than once".

Add inclusion guards where missing to address violations of the
guideline.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Federico Serafini authored and Stefano Stabellini committed 2025-05-16 17:21:43 -07:00
1 parent 6feaa61a2a
commit ca6ffd3cca
4 files changed
+20

No files matched your search

+5
View File
@@ -1,3 +1,6 @@
#ifndef DECOMPRESS_H
#define DECOMPRESS_H
#ifdef __XEN__
#include <xen/decompress.h>
@@ -22,3 +25,5 @@
#define large_free free
#endif
#endif /* DECOMPRESS_H */
+5
View File
@@ -1,3 +1,6 @@
#ifndef EFI_EFI_H
#define EFI_EFI_H
#include <asm/efibind.h>
#include <efi/efidef.h>
#include <efi/efierr.h>
@@ -51,3 +54,5 @@ void free_ebmalloc_unused_mem(void);
const void *pe_find_section(const void *image, const UINTN image_size,
const CHAR16 *section_name, UINTN *size_out);
#endif /* EFI_EFI_H */
+5
View File
@@ -1,5 +1,8 @@
/* Event channel handling private header. */
#ifndef EVENT_CHANNEL_H
#define EVENT_CHANNEL_H
#include <xen/event.h>
static inline unsigned int max_evtchns(const struct domain *d)
@@ -67,6 +70,8 @@ static inline void evtchn_fifo_destroy(struct domain *d)
}
#endif /* CONFIG_EVTCHN_FIFO */
#endif /* EVENT_CHANNEL_H */
/*
* Local variables:
* mode: C
+5
View File
@@ -1,3 +1,6 @@
#ifndef XEN_PCI_IDS_H
#define XEN_PCI_IDS_H
#define PCI_VENDOR_ID_AMD 0x1022
#define PCI_VENDOR_ID_NVIDIA 0x10de
@@ -11,3 +14,5 @@
#define PCI_VENDOR_ID_BROADCOM 0x14e4
#define PCI_VENDOR_ID_INTEL 0x8086
#endif /* XEN_PCI_IDS_H */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.