Skip to content

Commit

Permalink
libfdt: use modern include guards
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
Axel Heider committed May 30, 2023
1 parent c0e6c21 commit 279a4c1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 20 deletions.
7 changes: 2 additions & 5 deletions libfdt/fdt.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#ifndef FDT_H
#define FDT_H

/* SPDX-License-Identifier: GPL-2.0-or-later or BSD-2-Clause */

/*
Expand All @@ -9,6 +6,8 @@
* Copyright 2012 Kim Phillips, Freescale Semiconductor.
*/

#pragma once

#ifndef __ASSEMBLY__

struct fdt_header {
Expand Down Expand Up @@ -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 */
7 changes: 2 additions & 5 deletions libfdt/libfdt.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#ifndef LIBFDT_H
#define LIBFDT_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 "libfdt_env.h"
#include "fdt.h"

Expand Down Expand Up @@ -2153,5 +2152,3 @@ const char *fdt_strerror(int errval);
#ifdef __cplusplus
}
#endif

#endif /* LIBFDT_H */
7 changes: 2 additions & 5 deletions libfdt/libfdt_env.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#ifndef LIBFDT_ENV_H
#define LIBFDT_ENV_H

/* SPDX-License-Identifier: GPL-2.0-or-later or BSD-2-Clause */

/*
Expand All @@ -9,6 +6,8 @@
* Copyright 2012 Kim Phillips, Freescale Semiconductor.
*/

#pragma once

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Expand Down Expand Up @@ -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 */
8 changes: 3 additions & 5 deletions libfdt/libfdt_internal.h
Original file line number Diff line number Diff line change
@@ -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 <fdt.h>

#define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
Expand Down Expand Up @@ -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 */

0 comments on commit 279a4c1

Please sign in to comment.