Commit c3cf06f1 authored by Antonio Nino Diaz's avatar Antonio Nino Diaz
Browse files

Standardise header guards across codebase



All identifiers, regardless of use, that start with two underscores are
reserved. This means they can't be used in header guards.

The style that this project is now to use the full name of the file in
capital letters followed by 'H'. For example, for a file called
"uart_example.h", the header guard is UART_EXAMPLE_H.

The exceptions are files that are imported from other projects:

- CryptoCell driver
- dt-bindings folders
- zlib headers

Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e
Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
parent f5ae1b0e
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef BL2_H__ #ifndef BL2U_H
#define BL2_H__ #define BL2U_H
void bl2u_main(void); void bl2u_main(void);
#endif /* BL2_H__ */ #endif /* BL2U_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __BL31_H__ #ifndef BL31_H
#define __BL31_H__ #define BL31_H
#include <stdint.h> #include <stdint.h>
...@@ -21,4 +21,4 @@ void bl31_warm_entrypoint(void); ...@@ -21,4 +21,4 @@ void bl31_warm_entrypoint(void);
void bl31_main(void); void bl31_main(void);
void bl31_lib_init(void); void bl31_lib_init(void);
#endif /* __BL31_H__ */ #endif /* BL31_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __EA_HANDLE_H__ #ifndef EA_HANDLE_H
#define __EA_HANDLE_H__ #define EA_HANDLE_H
/* Constants indicating the reason for an External Abort */ /* Constants indicating the reason for an External Abort */
...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
/* RAS event signalled as peripheral interrupt */ /* RAS event signalled as peripheral interrupt */
#define ERROR_INTERRUPT 3 #define ERROR_INTERRUPT 3
#endif /* __EA_HANDLE_H__ */ #endif /* EA_HANDLE_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __INTERRUPT_MGMT_H__ #ifndef INTERRUPT_MGMT_H
#define __INTERRUPT_MGMT_H__ #define INTERRUPT_MGMT_H
#include <arch.h> #include <arch.h>
#include <utils_def.h> #include <utils_def.h>
...@@ -144,4 +144,4 @@ int disable_intr_rm_local(uint32_t type, uint32_t security_state); ...@@ -144,4 +144,4 @@ int disable_intr_rm_local(uint32_t type, uint32_t security_state);
int enable_intr_rm_local(uint32_t type, uint32_t security_state); int enable_intr_rm_local(uint32_t type, uint32_t security_state);
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif /* __INTERRUPT_MGMT_H__ */ #endif /* INTERRUPT_MGMT_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __TLK_H__ #ifndef TLK_H
#define __TLK_H__ #define TLK_H
#include <utils_def.h> #include <utils_def.h>
...@@ -63,4 +63,4 @@ ...@@ -63,4 +63,4 @@
#define TOS_UID 0xbf00ff01 /* Implementation UID */ #define TOS_UID 0xbf00ff01 /* Implementation UID */
#define TOS_CALL_VERSION 0xbf00ff03 /* Trusted OS Call Version */ #define TOS_CALL_VERSION 0xbf00ff03 /* Trusted OS Call Version */
#endif /* __TLK_H__ */ #endif /* TLK_H */
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __PLATFORM_SP_MIN_H__ #ifndef PLATFORM_SP_MIN_H
#define __PLATFORM_SP_MIN_H__ #define PLATFORM_SP_MIN_H
#include <stdint.h>
/******************************************************************************* /*******************************************************************************
* Mandatory SP_MIN functions * Mandatory SP_MIN functions
...@@ -20,4 +22,4 @@ entry_point_info_t *sp_min_plat_get_bl33_ep_info(void); ...@@ -20,4 +22,4 @@ entry_point_info_t *sp_min_plat_get_bl33_ep_info(void);
/* Platforms that enable SP_MIN_WITH_SECURE_FIQ shall implement this api */ /* Platforms that enable SP_MIN_WITH_SECURE_FIQ shall implement this api */
void sp_min_plat_fiq_handler(uint32_t id); void sp_min_plat_fiq_handler(uint32_t id);
#endif /* __PLATFORM_SP_MIN_H__ */ #endif /* PLATFORM_SP_MIN_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __PLATFORM_TSP_H__ #ifndef PLATFORM_TSP_H
#define PLATFORM_TSP_H
/******************************************************************************* /*******************************************************************************
* Mandatory TSP functions (only if platform contains a TSP) * Mandatory TSP functions (only if platform contains a TSP)
...@@ -14,7 +14,4 @@ void tsp_early_platform_setup(void); ...@@ -14,7 +14,4 @@ void tsp_early_platform_setup(void);
void tsp_plat_arch_setup(void); void tsp_plat_arch_setup(void);
void tsp_platform_setup(void); void tsp_platform_setup(void);
#endif /* PLATFORM_TSP_H */
#define __PLATFORM_H__
#endif
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __TSP_H__ #ifndef TSP_H
#define __TSP_H__ #define TSP_H
/* /*
* SMC function IDs that TSP uses to signal various forms of completions * SMC function IDs that TSP uses to signal various forms of completions
...@@ -107,4 +107,4 @@ typedef struct tsp_vectors { ...@@ -107,4 +107,4 @@ typedef struct tsp_vectors {
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __TSP_H__ */ #endif /* TSP_H */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __ASM_MACROS_S__ #ifndef ASM_MACROS_S
#define __ASM_MACROS_S__ #define ASM_MACROS_S
#include <arch.h> #include <arch.h>
#include <asm_macros_common.S> #include <asm_macros_common.S>
...@@ -189,4 +189,4 @@ ...@@ -189,4 +189,4 @@
.endif .endif
.endm .endm
#endif /* __ASM_MACROS_S__ */ #endif /* ASM_MACROS_S */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __ASSERT_MACROS_S__ #ifndef ASSERT_MACROS_S
#define __ASSERT_MACROS_S__ #define ASSERT_MACROS_S
/* /*
* Assembler macro to enable asm_assert. We assume that the stack is * Assembler macro to enable asm_assert. We assume that the stack is
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
b asm_assert;\ b asm_assert;\
300: 300:
#endif /* __ASSERT_MACROS_S__ */ #endif /* ASSERT_MACROS_S */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __CONSOLE_MACROS_S__ #ifndef CONSOLE_MACROS_S
#define __CONSOLE_MACROS_S__ #define CONSOLE_MACROS_S
#include <console.h> #include <console.h>
...@@ -81,4 +81,4 @@ ...@@ -81,4 +81,4 @@
b console_register b console_register
.endm .endm
#endif /* USE_FINISH_CONSOLE_REG_2 */ #endif /* USE_FINISH_CONSOLE_REG_2 */
#endif /* __CONSOLE_MACROS_S__ */ #endif /* CONSOLE_MACROS_S */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __EL3_COMMON_MACROS_S__ #ifndef EL3_COMMON_MACROS_S
#define __EL3_COMMON_MACROS_S__ #define EL3_COMMON_MACROS_S
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
...@@ -313,4 +313,4 @@ ...@@ -313,4 +313,4 @@
#endif #endif
.endm .endm
#endif /* __EL3_COMMON_MACROS_S__ */ #endif /* EL3_COMMON_MACROS_S */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __ASM_MACROS_S__ #ifndef ASM_MACROS_S
#define __ASM_MACROS_S__ #define ASM_MACROS_S
#include <arch.h> #include <arch.h>
#include <asm_macros_common.S> #include <asm_macros_common.S>
...@@ -192,4 +192,4 @@ ...@@ -192,4 +192,4 @@
.endm .endm
#endif #endif
#endif /* __ASM_MACROS_S__ */ #endif /* ASM_MACROS_S */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __ASSERT_MACROS_S__ #ifndef ASSERT_MACROS_S
#define __ASSERT_MACROS_S__ #define ASSERT_MACROS_S
/* /*
* Assembler macro to enable asm_assert. Use this macro wherever * Assembler macro to enable asm_assert. Use this macro wherever
...@@ -26,4 +26,4 @@ ...@@ -26,4 +26,4 @@
b asm_assert ;\ b asm_assert ;\
300: 300:
#endif /* __ASSERT_MACROS_S__ */ #endif /* ASSERT_MACROS_S */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __CONSOLE_MACROS_S__ #ifndef CONSOLE_MACROS_S
#define __CONSOLE_MACROS_S__ #define CONSOLE_MACROS_S
#include <console.h> #include <console.h>
...@@ -84,4 +84,5 @@ ...@@ -84,4 +84,5 @@
b console_register b console_register
.endm .endm
#endif /* USE_FINISH_CONSOLE_REG_2 */ #endif /* USE_FINISH_CONSOLE_REG_2 */
#endif /* __CONSOLE_MACROS_S__ */
#endif /* CONSOLE_MACROS_S */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __EL3_COMMON_MACROS_S__ #ifndef EL3_COMMON_MACROS_S
#define __EL3_COMMON_MACROS_S__ #define EL3_COMMON_MACROS_S
#include <arch.h> #include <arch.h>
#include <asm_macros.S> #include <asm_macros.S>
...@@ -341,4 +341,4 @@ ...@@ -341,4 +341,4 @@
#endif #endif
.endm .endm
#endif /* __EL3_COMMON_MACROS_S__ */ #endif /* EL3_COMMON_MACROS_S */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __ASM_MACROS_COMMON_S__ #ifndef ASM_MACROS_COMMON_S
#define __ASM_MACROS_COMMON_S__ #define ASM_MACROS_COMMON_S
/* /*
* This macro is used to create a function label and place the * This macro is used to create a function label and place the
...@@ -104,4 +104,4 @@ ...@@ -104,4 +104,4 @@
.endm .endm
#endif /* __ASM_MACROS_COMMON_S__ */ #endif /* ASM_MACROS_COMMON_S */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __BL_COMMON_H__ #ifndef BL_COMMON_H
#define __BL_COMMON_H__ #define BL_COMMON_H
#include <ep_info.h> #include <ep_info.h>
#include <param_header.h> #include <param_header.h>
...@@ -201,4 +201,4 @@ void setup_page_tables(const struct mmap_region *bl_regions, ...@@ -201,4 +201,4 @@ void setup_page_tables(const struct mmap_region *bl_regions,
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif /* __BL_COMMON_H__ */ #endif /* BL_COMMON_H */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __DESC_IMAGE_LOAD_H__ #ifndef DESC_IMAGE_LOAD_H
#define __DESC_IMAGE_LOAD_H__ #define DESC_IMAGE_LOAD_H
#include <bl_common.h> #include <bl_common.h>
...@@ -37,4 +37,4 @@ bl_load_info_t *get_bl_load_info_from_mem_params_desc(void); ...@@ -37,4 +37,4 @@ bl_load_info_t *get_bl_load_info_from_mem_params_desc(void);
bl_params_t *get_next_bl_params_from_mem_params_desc(void); bl_params_t *get_next_bl_params_from_mem_params_desc(void);
void populate_next_bl_params_config(bl_params_t *bl2_to_next_bl_params); void populate_next_bl_params_config(bl_params_t *bl2_to_next_bl_params);
#endif /* __DESC_IMAGE_LOAD_H__ */ #endif /* DESC_IMAGE_LOAD_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __EP_INFO_H__ #ifndef EP_INFO_H
#define __EP_INFO_H__ #define EP_INFO_H
#include <param_header.h> #include <param_header.h>
#include <utils_def.h> #include <utils_def.h>
...@@ -132,5 +132,4 @@ CASSERT(sizeof(uintptr_t) == ...@@ -132,5 +132,4 @@ CASSERT(sizeof(uintptr_t) ==
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif /* __EP_INFO_H__ */ #endif /* EP_INFO_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment