From 65ec942e61093996a6f2d6eb616a10f041aba2d5 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Wed, 31 May 2023 14:22:45 +0200 Subject: [PATCH] libfdt: use modern include guards Signed-off-by: Axel Heider --- libfdt/fdt.h | 7 +++---- libfdt/libfdt.h | 7 +++---- libfdt/libfdt_env.h | 7 +++---- libfdt/libfdt_internal.h | 8 ++++---- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/libfdt/fdt.h b/libfdt/fdt.h index 0c91aa7..d604fbe 100644 --- a/libfdt/fdt.h +++ b/libfdt/fdt.h @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */ -#ifndef FDT_H -#define FDT_H + /* * libfdt - Flat Device Tree manipulation * Copyright (C) 2006 David Gibson, IBM Corporation. * Copyright 2012 Kim Phillips, Freescale Semiconductor. */ +#pragma once + #ifndef __ASSEMBLY__ struct fdt_header { @@ -62,5 +63,3 @@ struct fdt_property { #define FDT_V3_SIZE (FDT_V2_SIZE + sizeof(fdt32_t)) #define FDT_V16_SIZE FDT_V3_SIZE #define FDT_V17_SIZE (FDT_V16_SIZE + sizeof(fdt32_t)) - -#endif /* FDT_H */ diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h index 34c4d55..d7b1d28 100644 --- a/libfdt/libfdt.h +++ b/libfdt/libfdt.h @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */ -#ifndef LIBFDT_H -#define LIBFDT_H + /* * libfdt - Flat Device Tree manipulation * Copyright (C) 2006 David Gibson, IBM Corporation. */ +#pragma once + #include #include @@ -2211,5 +2212,3 @@ const char *fdt_strerror(int errval); #ifdef __cplusplus } #endif - -#endif /* LIBFDT_H */ diff --git a/libfdt/libfdt_env.h b/libfdt/libfdt_env.h index 73b6d40..4e9af56 100644 --- a/libfdt/libfdt_env.h +++ b/libfdt/libfdt_env.h @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */ -#ifndef LIBFDT_ENV_H -#define LIBFDT_ENV_H + /* * libfdt - Flat Device Tree manipulation * Copyright (C) 2006 David Gibson, IBM Corporation. * Copyright 2012 Kim Phillips, Freescale Semiconductor. */ +#pragma once + #include #include #include @@ -92,5 +93,3 @@ static inline size_t fdt_strnlen(const char *string, size_t max_count) MAC_OS_X_VERSION_10_7) */ #endif /* __APPLE__ */ - -#endif /* LIBFDT_ENV_H */ diff --git a/libfdt/libfdt_internal.h b/libfdt/libfdt_internal.h index 16bda19..30037df 100644 --- a/libfdt/libfdt_internal.h +++ b/libfdt/libfdt_internal.h @@ -1,10 +1,12 @@ /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */ -#ifndef LIBFDT_INTERNAL_H -#define LIBFDT_INTERNAL_H + /* * libfdt - Flat Device Tree manipulation * Copyright (C) 2006 David Gibson, IBM Corporation. */ + +#pragma once + #include #define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) @@ -188,5 +190,3 @@ static inline bool can_assume_(int mask) /** helper macros for checking assumptions */ #define can_assume(_assume) can_assume_(ASSUME_ ## _assume) - -#endif /* LIBFDT_INTERNAL_H */