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
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* for PU Power Management. This file should be common for all PU's. * for PU Power Management. This file should be common for all PU's.
*/ */
#ifndef _PM_COMMON_H_ #ifndef PM_COMMON_H
#define _PM_COMMON_H_ #define PM_COMMON_H
#include <debug.h> #include <debug.h>
#include <stdint.h> #include <stdint.h>
...@@ -52,4 +52,4 @@ struct pm_proc { ...@@ -52,4 +52,4 @@ struct pm_proc {
const struct pm_proc *pm_get_proc(unsigned int cpuid); const struct pm_proc *pm_get_proc(unsigned int cpuid);
const struct pm_proc *pm_get_proc_by_node(enum pm_node_id nid); const struct pm_proc *pm_get_proc_by_node(enum pm_node_id nid);
#endif /* _PM_COMMON_H_ */ #endif /* PM_COMMON_H */
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
/* ZynqMP power management enums and defines */ /* ZynqMP power management enums and defines */
#ifndef _PM_DEFS_H_ #ifndef PM_DEFS_H
#define _PM_DEFS_H_ #define PM_DEFS_H
/********************************************************************* /*********************************************************************
* Macro definitions * Macro definitions
...@@ -265,4 +265,4 @@ enum pm_shutdown_subtype { ...@@ -265,4 +265,4 @@ enum pm_shutdown_subtype {
PMF_SHUTDOWN_SUBTYPE_SYSTEM, PMF_SHUTDOWN_SUBTYPE_SYSTEM,
}; };
#endif /* _PM_DEFS_H_ */ #endif /* PM_DEFS_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef _PM_IPI_H_ #ifndef PM_IPI_H
#define _PM_IPI_H_ #define PM_IPI_H
#include "pm_common.h" #include "pm_common.h"
...@@ -22,4 +22,4 @@ void pm_ipi_buff_read_callb(unsigned int *value, size_t count); ...@@ -22,4 +22,4 @@ void pm_ipi_buff_read_callb(unsigned int *value, size_t count);
void pm_ipi_irq_enable(const struct pm_proc *proc); void pm_ipi_irq_enable(const struct pm_proc *proc);
void pm_ipi_irq_clear(const struct pm_proc *proc); void pm_ipi_irq_clear(const struct pm_proc *proc);
#endif /* _PM_IPI_H_ */ #endif /* PM_IPI_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef _PM_SVC_MAIN_H_ #ifndef PM_SVC_MAIN_H
#define _PM_SVC_MAIN_H_ #define PM_SVC_MAIN_H
#include "pm_common.h" #include "pm_common.h"
...@@ -14,4 +14,4 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3, ...@@ -14,4 +14,4 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
uint64_t x4, void *cookie, void *handle, uint64_t x4, void *cookie, void *handle,
uint64_t flags); uint64_t flags);
#endif /* _PM_SVC_MAIN_H_ */ #endif /* PM_SVC_MAIN_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __ZYNQMP_DEF_H__ #ifndef ZYNQMP_DEF_H
#define __ZYNQMP_DEF_H__ #define ZYNQMP_DEF_H
#include <common_def.h> #include <common_def.h>
...@@ -340,4 +340,4 @@ ...@@ -340,4 +340,4 @@
#define AFIFM6_WRCTRL U(13) #define AFIFM6_WRCTRL U(13)
#define FABRIC_WIDTH U(3) #define FABRIC_WIDTH U(3)
#endif /* __ZYNQMP_DEF_H__ */ #endif /* ZYNQMP_DEF_H */
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
/* ZynqMP IPI management enums and defines */ /* ZynqMP IPI management enums and defines */
#ifndef _ZYNQMP_IPI_H_ #ifndef ZYNQMP_IPI_H
#define _ZYNQMP_IPI_H_ #define ZYNQMP_IPI_H
#include <stdint.h> #include <stdint.h>
...@@ -67,4 +67,4 @@ void ipi_mb_disable_irq(uint32_t local, uint32_t remote); ...@@ -67,4 +67,4 @@ void ipi_mb_disable_irq(uint32_t local, uint32_t remote);
/* Enable IPI mailbox notification interrupt */ /* Enable IPI mailbox notification interrupt */
void ipi_mb_enable_irq(uint32_t local, uint32_t remote); void ipi_mb_enable_irq(uint32_t local, uint32_t remote);
#endif /* _ZYNQMP_IPI_H_ */ #endif /* ZYNQMP_IPI_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __ZYNQMP_PRIVATE_H__ #ifndef ZYNQMP_PRIVATE_H
#define __ZYNQMP_PRIVATE_H__ #define ZYNQMP_PRIVATE_H
#include <bl_common.h> #include <bl_common.h>
#include <interrupt_mgmt.h> #include <interrupt_mgmt.h>
...@@ -38,4 +38,4 @@ int request_intr_type_el3(uint32_t, interrupt_type_handler_t); ...@@ -38,4 +38,4 @@ int request_intr_type_el3(uint32_t, interrupt_type_handler_t);
enum fsbl_handoff fsbl_atf_handover(entry_point_info_t *bl32_image_ep_info, enum fsbl_handoff fsbl_atf_handover(entry_point_info_t *bl32_image_ep_info,
entry_point_info_t *bl33_image_ep_info); entry_point_info_t *bl33_image_ep_info);
#endif /* __ZYNQMP_PRIVATE_H__ */ #endif /* ZYNQMP_PRIVATE_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __OPTEED_PRIVATE_H__ #ifndef OPTEED_PRIVATE_H
#define __OPTEED_PRIVATE_H__ #define OPTEED_PRIVATE_H
#include <arch.h> #include <arch.h>
#include <context.h> #include <context.h>
...@@ -157,4 +157,4 @@ extern uint32_t opteed_rw; ...@@ -157,4 +157,4 @@ extern uint32_t opteed_rw;
extern struct optee_vectors *optee_vector_table; extern struct optee_vectors *optee_vector_table;
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif /* __OPTEED_PRIVATE_H__ */ #endif /* OPTEED_PRIVATE_H */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __TEESMC_OPTEED_MACROS_H__ #ifndef TEESMC_OPTEED_MACROS_H
#define __TEESMC_OPTEED_MACROS_H__ #define TEESMC_OPTEED_MACROS_H
#include <runtime_svc.h> #include <runtime_svc.h>
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
(62 << FUNCID_OEN_SHIFT) | \ (62 << FUNCID_OEN_SHIFT) | \
((func_num) & FUNCID_NUM_MASK)) ((func_num) & FUNCID_NUM_MASK))
#endif /*__TEESMC_OPTEED_MACROS_H__*/ #endif /* TEESMC_OPTEED_MACROS_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __TLKD_PRIVATE_H__ #ifndef TLKD_PRIVATE_H
#define __TLKD_PRIVATE_H__ #define TLKD_PRIVATE_H
#include <arch.h> #include <arch.h>
#include <context.h> #include <context.h>
...@@ -119,4 +119,4 @@ void tlkd_init_tlk_ep_state(struct entry_point_info *tlk_entry_point, ...@@ -119,4 +119,4 @@ void tlkd_init_tlk_ep_state(struct entry_point_info *tlk_entry_point,
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif /* __TLKD_PRIVATE_H__ */ #endif /* TLKD_PRIVATE_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __LIB_SM_SM_ERR_H #ifndef SM_ERR_H
#define __LIB_SM_SM_ERR_H #define SM_ERR_H
/* Errors from the secure monitor */ /* Errors from the secure monitor */
#define SM_ERR_UNDEFINED_SMC 0xFFFFFFFF /* Unknown SMC (defined by ARM DEN 0028A(0.9.0) */ #define SM_ERR_UNDEFINED_SMC 0xFFFFFFFF /* Unknown SMC (defined by ARM DEN 0028A(0.9.0) */
...@@ -19,4 +19,4 @@ ...@@ -19,4 +19,4 @@
#define SM_ERR_NOT_ALLOWED -9 /* SMC call not allowed */ #define SM_ERR_NOT_ALLOWED -9 /* SMC call not allowed */
#define SM_ERR_END_OF_INPUT -10 #define SM_ERR_END_OF_INPUT -10
#endif #endif /* SM_ERR_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __LIB_SM_SMCALL_H #ifndef SMCALL_H
#define __LIB_SM_SMCALL_H #define SMCALL_H
#define SMC_NUM_ENTITIES 64 #define SMC_NUM_ENTITIES 64
#define SMC_NUM_ARGS 4 #define SMC_NUM_ARGS 4
...@@ -72,4 +72,4 @@ ...@@ -72,4 +72,4 @@
#define SMC_YC_VDEV_KICK_VQ SMC_YIELDCALL_NR(SMC_ENTITY_TRUSTED_OS, 24) #define SMC_YC_VDEV_KICK_VQ SMC_YIELDCALL_NR(SMC_ENTITY_TRUSTED_OS, 24)
#define SMC_YC_SET_ROT_PARAMS SMC_YIELDCALL_NR(SMC_ENTITY_TRUSTED_OS, 65535) #define SMC_YC_SET_ROT_PARAMS SMC_YIELDCALL_NR(SMC_ENTITY_TRUSTED_OS, 65535)
#endif /* __LIB_SM_SMCALL_H */ #endif /* SMCALL_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __TSPD_PRIVATE_H__ #ifndef TSPD_PRIVATE_H
#define __TSPD_PRIVATE_H__ #define TSPD_PRIVATE_H
#include <arch.h> #include <arch.h>
#include <context.h> #include <context.h>
...@@ -227,4 +227,4 @@ extern tsp_context_t tspd_sp_context[TSPD_CORE_COUNT]; ...@@ -227,4 +227,4 @@ extern tsp_context_t tspd_sp_context[TSPD_CORE_COUNT];
extern tsp_vectors_t *tsp_vectors; extern tsp_vectors_t *tsp_vectors;
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLY__*/
#endif /* __TSPD_PRIVATE_H__ */ #endif /* TSPD_PRIVATE_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __SPM_PRIVATE_H__ #ifndef SPM_PRIVATE_H
#define __SPM_PRIVATE_H__ #define SPM_PRIVATE_H
#include <context.h> #include <context.h>
...@@ -67,4 +67,4 @@ int spm_memory_attributes_set_smc_handler(sp_context_t *sp_ctx, ...@@ -67,4 +67,4 @@ int spm_memory_attributes_set_smc_handler(sp_context_t *sp_ctx,
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __SPM_PRIVATE_H__ */ #endif /* SPM_PRIVATE_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __SPM_SHIM_PRIVATE__ #ifndef SPM_SHIM_PRIVATE_H
#define __SPM_SHIM_PRIVATE__ #define SPM_SHIM_PRIVATE_H
#include <stdint.h> #include <stdint.h>
#include <utils_def.h> #include <utils_def.h>
...@@ -22,4 +22,4 @@ IMPORT_SYM(uintptr_t, __SPM_SHIM_EXCEPTIONS_END__, SPM_SHIM_EXCEPTIONS_END); ...@@ -22,4 +22,4 @@ IMPORT_SYM(uintptr_t, __SPM_SHIM_EXCEPTIONS_END__, SPM_SHIM_EXCEPTIONS_END);
#define SPM_SHIM_EXCEPTIONS_SIZE \ #define SPM_SHIM_EXCEPTIONS_SIZE \
(SPM_SHIM_EXCEPTIONS_END - SPM_SHIM_EXCEPTIONS_START) (SPM_SHIM_EXCEPTIONS_END - SPM_SHIM_EXCEPTIONS_START)
#endif /* __SPM_SHIM_PRIVATE__ */ #endif /* SPM_SHIM_PRIVATE_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef CERT_H_ #ifndef CERT_H
#define CERT_H_ #define CERT_H
#include <openssl/ossl_typ.h> #include <openssl/ossl_typ.h>
#include <openssl/x509.h> #include <openssl/x509.h>
...@@ -65,4 +65,4 @@ int cert_new( ...@@ -65,4 +65,4 @@ int cert_new(
extern cert_t *certs; extern cert_t *certs;
extern const unsigned int num_certs; extern const unsigned int num_certs;
#endif /* CERT_H_ */ #endif /* CERT_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef CMD_OPT_H_ #ifndef CMD_OPT_H
#define CMD_OPT_H_ #define CMD_OPT_H
#include <getopt.h> #include <getopt.h>
...@@ -30,4 +30,4 @@ const struct option *cmd_opt_get_array(void); ...@@ -30,4 +30,4 @@ const struct option *cmd_opt_get_array(void);
const char *cmd_opt_get_name(int idx); const char *cmd_opt_get_name(int idx);
const char *cmd_opt_get_help_msg(int idx); const char *cmd_opt_get_help_msg(int idx);
#endif /* CMD_OPT_H_ */ #endif /* CMD_OPT_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef __DEBUG_H__ #ifndef DEBUG_H
#define __DEBUG_H__ #define DEBUG_H
#include <stdio.h> #include <stdio.h>
...@@ -56,4 +56,4 @@ ...@@ -56,4 +56,4 @@
# define VERBOSE(...) # define VERBOSE(...)
#endif #endif
#endif /* __DEBUG_H__ */ #endif /* DEBUG_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef EXT_H_ #ifndef EXT_H
#define EXT_H_ #define EXT_H
#include <openssl/x509v3.h> #include <openssl/x509v3.h>
#include "key.h" #include "key.h"
...@@ -82,4 +82,4 @@ X509_EXTENSION *ext_new_key(int nid, int crit, EVP_PKEY *k); ...@@ -82,4 +82,4 @@ X509_EXTENSION *ext_new_key(int nid, int crit, EVP_PKEY *k);
extern ext_t *extensions; extern ext_t *extensions;
extern const unsigned int num_extensions; extern const unsigned int num_extensions;
#endif /* EXT_H_ */ #endif /* EXT_H */
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef KEY_H_ #ifndef KEY_H
#define KEY_H_ #define KEY_H
#include <openssl/ossl_typ.h> #include <openssl/ossl_typ.h>
...@@ -71,4 +71,4 @@ int key_store(key_t *key); ...@@ -71,4 +71,4 @@ int key_store(key_t *key);
extern key_t *keys; extern key_t *keys;
extern const unsigned int num_keys; extern const unsigned int num_keys;
#endif /* KEY_H_ */ #endif /* KEY_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