From 6136bca06720c64226c0dc9802fa1613b735e357 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Wed, 31 May 2023 13:58:58 +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, 9 insertions(+), 20 deletions(-) diff --git a/libfdt/fdt.h b/libfdt/fdt.h index 38191dbca..90d4397b8 100644 --- a/libfdt/fdt.h +++ b/libfdt/fdt.h @@ -1,6 +1,3 @@ -#ifndef FDT_H -#define FDT_H - /* SPDX-License-Identifier: GPL-2.0-or-later or BSD-2-Clause */ /* @@ -9,6 +6,8 @@ * Copyright 2012 Kim Phillips, Freescale Semiconductor. */ +#pragma once + #ifndef __ASSEMBLY__ struct fdt_header { @@ -64,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 5bed29559..7f22e5c81 100644 --- a/libfdt/libfdt.h +++ b/libfdt/libfdt.h @@ -1,6 +1,3 @@ -#ifndef LIBFDT_H -#define LIBFDT_H - /* SPDX-License-Identifier: GPL-2.0-or-later or BSD-2-Clause */ /* @@ -8,6 +5,8 @@ * Copyright (C) 2006 David Gibson, IBM Corporation. */ +#pragma once + #include #include @@ -2152,5 +2151,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 dfbcdbe89..3ea9a4631 100644 --- a/libfdt/libfdt_env.h +++ b/libfdt/libfdt_env.h @@ -1,6 +1,3 @@ -#ifndef LIBFDT_ENV_H -#define LIBFDT_ENV_H - /* SPDX-License-Identifier: GPL-2.0-or-later or BSD-2-Clause */ /* @@ -9,6 +6,8 @@ * Copyright 2012 Kim Phillips, Freescale Semiconductor. */ +#pragma once + #include #include #include @@ -94,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 52e514f94..eef4a1ed0 100644 --- a/libfdt/libfdt_internal.h +++ b/libfdt/libfdt_internal.h @@ -1,12 +1,12 @@ -#ifndef LIBFDT_INTERNAL_H -#define LIBFDT_INTERNAL_H - /* SPDX-License-Identifier: GPL-2.0-or-later or BSD-2-Clause */ /* * 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)) @@ -190,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 */