efi: move guid helper functions to efi.h

Move the guidcmp() and guidcpy() functions to efi.h, near the definition of
the efi_guid_t type those functions deal with.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
This commit is contained in:
Vincent Stehlé
2024-07-03 13:37:55 +02:00
committed by Tom Rini
parent 0318126236
commit 0a1bf35f5f
2 changed files with 10 additions and 10 deletions

View File

@@ -78,6 +78,16 @@ typedef struct {
u8 b[16];
} efi_guid_t __attribute__((aligned(4)));
static inline int guidcmp(const void *g1, const void *g2)
{
return memcmp(g1, g2, sizeof(efi_guid_t));
}
static inline void *guidcpy(void *dst, const void *src)
{
return memcpy(dst, src, sizeof(efi_guid_t));
}
#define EFI_BITS_PER_LONG (sizeof(long) * 8)
/* Bit mask for EFI status code with error */

View File

@@ -21,16 +21,6 @@
struct blk_desc;
struct jmp_buf_data;
static inline int guidcmp(const void *g1, const void *g2)
{
return memcmp(g1, g2, sizeof(efi_guid_t));
}
static inline void *guidcpy(void *dst, const void *src)
{
return memcpy(dst, src, sizeof(efi_guid_t));
}
#if CONFIG_IS_ENABLED(EFI_LOADER)
/**