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,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __AUTH_MOD_H__ #ifndef AUTH_MOD_H
#define __AUTH_MOD_H__ #define AUTH_MOD_H
#if TRUSTED_BOARD_BOOT #if TRUSTED_BOARD_BOOT
...@@ -49,4 +49,4 @@ extern unsigned int auth_img_flags[MAX_NUMBER_IDS]; ...@@ -49,4 +49,4 @@ extern unsigned int auth_img_flags[MAX_NUMBER_IDS];
#endif /* TRUSTED_BOARD_BOOT */ #endif /* TRUSTED_BOARD_BOOT */
#endif /* __AUTH_MOD_H__ */ #endif /* AUTH_MOD_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __CRYPTO_MOD_H__ #ifndef CRYPTO_MOD_H
#define __CRYPTO_MOD_H__ #define CRYPTO_MOD_H
/* Return values */ /* Return values */
enum crypto_ret_value { enum crypto_ret_value {
...@@ -59,4 +59,4 @@ int crypto_mod_verify_hash(void *data_ptr, unsigned int data_len, ...@@ -59,4 +59,4 @@ int crypto_mod_verify_hash(void *data_ptr, unsigned int data_len,
extern const crypto_lib_desc_t crypto_lib_desc; extern const crypto_lib_desc_t crypto_lib_desc;
#endif /* __CRYPTO_MOD_H__ */ #endif /* CRYPTO_MOD_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __IMG_PARSER_MOD_H__ #ifndef IMG_PARSER_MOD_H
#define __IMG_PARSER_MOD_H__ #define IMG_PARSER_MOD_H
#include <auth_common.h> #include <auth_common.h>
...@@ -61,4 +61,4 @@ int img_parser_get_auth_param(img_type_t img_type, ...@@ -61,4 +61,4 @@ int img_parser_get_auth_param(img_type_t img_type,
.get_auth_param = _get_param \ .get_auth_param = _get_param \
} }
#endif /* __IMG_PARSER_MOD_H__ */ #endif /* IMG_PARSER_MOD_H */
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __MBEDTLS_COMMON_H__ #ifndef MBEDTLS_COMMON_H
#define __MBEDTLS_COMMON_H__ #define MBEDTLS_COMMON_H
void mbedtls_init(void); void mbedtls_init(void);
#endif /* __MBEDTLS_COMMON_H__ */ #endif /* MBEDTLS_COMMON_H */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __MBEDTLS_CONFIG_H__ #ifndef MBEDTLS_CONFIG_H
#define __MBEDTLS_CONFIG_H__ #define MBEDTLS_CONFIG_H
/* /*
* Key algorithms currently supported on mbed TLS libraries * Key algorithms currently supported on mbed TLS libraries
...@@ -104,4 +104,4 @@ ...@@ -104,4 +104,4 @@
#define TF_MBEDTLS_HEAP_SIZE U(7168) #define TF_MBEDTLS_HEAP_SIZE U(7168)
#endif #endif
#endif /* __MBEDTLS_CONFIG_H__ */ #endif /* MBEDTLS_CONFIG_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __CADENCE_UART_H__ #ifndef CDNS_UART_H
#define __CADENCE_UART_H__ #define CDNS_UART_H
#include <console.h> #include <console.h>
...@@ -47,4 +47,4 @@ int console_cdns_register(uint64_t baseaddr, uint32_t clock, uint32_t baud, ...@@ -47,4 +47,4 @@ int console_cdns_register(uint64_t baseaddr, uint32_t clock, uint32_t baud,
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif #endif /* CDNS_UART_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __NORFLASH_H_ #ifndef V2M_FLASH_H
#define __NORFLASH_H_ #define V2M_FLASH_H
#include <stdint.h> #include <stdint.h>
...@@ -42,5 +42,4 @@ int nor_lock(uintptr_t base_addr); ...@@ -42,5 +42,4 @@ int nor_lock(uintptr_t base_addr);
int nor_unlock(uintptr_t base_addr); int nor_unlock(uintptr_t base_addr);
int nor_erase(uintptr_t base_addr); int nor_erase(uintptr_t base_addr);
#endif /* __NORFLASH_H_ */ #endif /* V2M_FLASH_H*/
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __CONSOLE_H__ #ifndef CONSOLE_H
#define __CONSOLE_H__ #define CONSOLE_H
#include <utils_def.h> #include <utils_def.h>
...@@ -80,5 +80,4 @@ void console_uninit(void); ...@@ -80,5 +80,4 @@ void console_uninit(void);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __CONSOLE_H__ */ #endif /* CONSOLE_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __CONSOLE_ASSERTIONS_H__ #ifndef CONSOLE_ASSERTIONS_H
#define __CONSOLE_ASSERTIONS_H__ #define CONSOLE_ASSERTIONS_H
#include <cassert.h> #include <cassert.h>
...@@ -26,5 +26,4 @@ CASSERT(CONSOLE_T_FLUSH == __builtin_offsetof(console_t, flush), ...@@ -26,5 +26,4 @@ CASSERT(CONSOLE_T_FLUSH == __builtin_offsetof(console_t, flush),
CASSERT(CONSOLE_T_DRVDATA == sizeof(console_t), CASSERT(CONSOLE_T_DRVDATA == sizeof(console_t),
assert_console_t_drvdata_offset_mismatch); assert_console_t_drvdata_offset_mismatch);
#endif /* __CONSOLE_ASSERTIONS_H__ */ #endif /* CONSOLE_ASSERTIONS_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __CBMEM_CONSOLE_H__ #ifndef CBMEM_CONSOLE_H
#define __CBMEM_CONSOLE_H__ #define CBMEM_CONSOLE_H
#include <console.h> #include <console.h>
...@@ -24,4 +24,4 @@ int console_cbmc_register(uintptr_t base, console_cbmc_t *console); ...@@ -24,4 +24,4 @@ int console_cbmc_register(uintptr_t base, console_cbmc_t *console);
#endif /* __ASSEMBLER__ */ #endif /* __ASSEMBLER__ */
#endif /* __CBMEM_CONSOLE_H__ */ #endif /* CBMEM_CONSOLE_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __DELAY_TIMER_H__ #ifndef DELAY_TIMER_H
#define __DELAY_TIMER_H__ #define DELAY_TIMER_H
#include <stdint.h> #include <stdint.h>
...@@ -27,5 +27,4 @@ void mdelay(uint32_t msec); ...@@ -27,5 +27,4 @@ void mdelay(uint32_t msec);
void udelay(uint32_t usec); void udelay(uint32_t usec);
void timer_init(const timer_ops_t *ops_ptr); void timer_init(const timer_ops_t *ops_ptr);
#endif /* DELAY_TIMER_H */
#endif /* __DELAY_TIMER_H__ */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __DW_UFS_H__ #ifndef DW_UFS_H
#define __DW_UFS_H__ #define DW_UFS_H
#include <stdint.h> #include <stdint.h>
...@@ -107,4 +107,4 @@ typedef struct dw_ufs_params { ...@@ -107,4 +107,4 @@ typedef struct dw_ufs_params {
int dw_ufs_init(dw_ufs_params_t *params); int dw_ufs_init(dw_ufs_params_t *params);
#endif /* __DW_UFS_H__ */ #endif /* DW_UFS_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __GENERIC_DELAY_TIMER_H__ #ifndef GENERIC_DELAY_TIMER_H
#define __GENERIC_DELAY_TIMER_H__ #define GENERIC_DELAY_TIMER_H
#include <stdint.h> #include <stdint.h>
...@@ -13,4 +13,4 @@ void generic_delay_timer_init_args(uint32_t mult, uint32_t div); ...@@ -13,4 +13,4 @@ void generic_delay_timer_init_args(uint32_t mult, uint32_t div);
void generic_delay_timer_init(void); void generic_delay_timer_init(void);
#endif /* __GENERIC_DELAY_TIMER_H__ */ #endif /* GENERIC_DELAY_TIMER_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __GPIO_H__ #ifndef GPIO_H
#define __GPIO_H__ #define GPIO_H
#define GPIO_DIR_OUT 0 #define GPIO_DIR_OUT 0
#define GPIO_DIR_IN 1 #define GPIO_DIR_IN 1
...@@ -34,4 +34,4 @@ void gpio_set_pull(int gpio, int pull); ...@@ -34,4 +34,4 @@ void gpio_set_pull(int gpio, int pull);
int gpio_get_pull(int gpio); int gpio_get_pull(int gpio);
void gpio_init(const gpio_ops_t *ops); void gpio_init(const gpio_ops_t *ops);
#endif /* __GPIO_H__ */ #endif /* GPIO_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __IO_BLOCK_H__ #ifndef IO_BLOCK_H
#define __IO_BLOCK_H__ #define IO_BLOCK_H
#include <io_storage.h> #include <io_storage.h>
...@@ -25,4 +25,4 @@ struct io_dev_connector; ...@@ -25,4 +25,4 @@ struct io_dev_connector;
int register_io_dev_block(const struct io_dev_connector **dev_con); int register_io_dev_block(const struct io_dev_connector **dev_con);
#endif /* __IO_BLOCK_H__ */ #endif /* IO_BLOCK_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __IO_DRIVER_H__ #ifndef IO_DRIVER_H
#define __IO_DRIVER_H__ #define IO_DRIVER_H
#include <io_storage.h> #include <io_storage.h>
#include <stdint.h> #include <stdint.h>
...@@ -56,4 +56,4 @@ typedef struct io_dev_funcs { ...@@ -56,4 +56,4 @@ typedef struct io_dev_funcs {
/* Register an IO device */ /* Register an IO device */
int io_register_device(const io_dev_info_t *dev_info); int io_register_device(const io_dev_info_t *dev_info);
#endif /* __IO_DRIVER_H__ */ #endif /* IO_DRIVER_H */
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __IO_DUMMY_H__ #ifndef IO_DUMMY_H
#define __IO_DUMMY_H__ #define IO_DUMMY_H
int register_io_dev_dummy(const struct io_dev_connector **dev_con); int register_io_dev_dummy(const struct io_dev_connector **dev_con);
#endif /* __IO_DUMMY_H__ */ #endif /* IO_DUMMY_H */
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __IO_FIP_H__ #ifndef IO_FIP_H
#define __IO_FIP_H__ #define IO_FIP_H
struct io_dev_connector; struct io_dev_connector;
int register_io_dev_fip(const struct io_dev_connector **dev_con); int register_io_dev_fip(const struct io_dev_connector **dev_con);
#endif /* __IO_FIP_H__ */ #endif /* IO_FIP_H */
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __IO_MEMMAP_H__ #ifndef IO_MEMMAP_H
#define __IO_MEMMAP_H__ #define IO_MEMMAP_H
struct io_dev_connector; struct io_dev_connector;
int register_io_dev_memmap(const struct io_dev_connector **dev_con); int register_io_dev_memmap(const struct io_dev_connector **dev_con);
#endif /* __IO_MEMMAP_H__ */ #endif /* IO_MEMMAP_H */
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __IO_SH_H__ #ifndef IO_SEMIHOSTING_H
#define __IO_SH_H__ #define IO_SEMIHOSTING_H
struct io_dev_connector; struct io_dev_connector;
int register_io_dev_sh(const struct io_dev_connector **dev_con); int register_io_dev_sh(const struct io_dev_connector **dev_con);
#endif /* __IO_SH_H__ */ #endif /* IO_SEMIHOSTING_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