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: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
diff --git a/include/common/aarch32/asm_macros.S b/include/common/aarch32/asm_macros.S
index f7d0595..c54f75c 100644
--- a/include/common/aarch32/asm_macros.S
+++ b/include/common/aarch32/asm_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __ASM_MACROS_S__
-#define __ASM_MACROS_S__
+#ifndef ASM_MACROS_S
+#define ASM_MACROS_S
 
 #include <arch.h>
 #include <asm_macros_common.S>
@@ -189,4 +189,4 @@
 		.endif
 	.endm
 
-#endif /* __ASM_MACROS_S__ */
+#endif /* ASM_MACROS_S */
diff --git a/include/common/aarch32/assert_macros.S b/include/common/aarch32/assert_macros.S
index c958810..ab3a2eb 100644
--- a/include/common/aarch32/assert_macros.S
+++ b/include/common/aarch32/assert_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __ASSERT_MACROS_S__
-#define __ASSERT_MACROS_S__
+#ifndef ASSERT_MACROS_S
+#define ASSERT_MACROS_S
 
 	/*
 	 * Assembler macro to enable asm_assert. We assume that the stack is
@@ -23,4 +23,4 @@
 	b	asm_assert;\
 300:
 
-#endif /* __ASSERT_MACROS_S__ */
+#endif /* ASSERT_MACROS_S */
diff --git a/include/common/aarch32/console_macros.S b/include/common/aarch32/console_macros.S
index 7c30688..ba6e7d0 100644
--- a/include/common/aarch32/console_macros.S
+++ b/include/common/aarch32/console_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __CONSOLE_MACROS_S__
-#define __CONSOLE_MACROS_S__
+#ifndef CONSOLE_MACROS_S
+#define CONSOLE_MACROS_S
 
 #include <console.h>
 
@@ -81,4 +81,4 @@
 	b	console_register
 	.endm
 #endif /* USE_FINISH_CONSOLE_REG_2 */
-#endif /* __CONSOLE_MACROS_S__ */
+#endif /* CONSOLE_MACROS_S */
diff --git a/include/common/aarch32/el3_common_macros.S b/include/common/aarch32/el3_common_macros.S
index 5db8854..9b18ba3 100644
--- a/include/common/aarch32/el3_common_macros.S
+++ b/include/common/aarch32/el3_common_macros.S
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __EL3_COMMON_MACROS_S__
-#define __EL3_COMMON_MACROS_S__
+#ifndef EL3_COMMON_MACROS_S
+#define EL3_COMMON_MACROS_S
 
 #include <arch.h>
 #include <asm_macros.S>
@@ -313,4 +313,4 @@
 #endif
 	.endm
 
-#endif /* __EL3_COMMON_MACROS_S__ */
+#endif /* EL3_COMMON_MACROS_S */
diff --git a/include/common/aarch64/asm_macros.S b/include/common/aarch64/asm_macros.S
index 91416e4..dea3021 100644
--- a/include/common/aarch64/asm_macros.S
+++ b/include/common/aarch64/asm_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __ASM_MACROS_S__
-#define __ASM_MACROS_S__
+#ifndef ASM_MACROS_S
+#define ASM_MACROS_S
 
 #include <arch.h>
 #include <asm_macros_common.S>
@@ -192,4 +192,4 @@
 	.endm
 #endif
 
-#endif /* __ASM_MACROS_S__ */
+#endif /* ASM_MACROS_S */
diff --git a/include/common/aarch64/assert_macros.S b/include/common/aarch64/assert_macros.S
index 4567c69..06371c4 100644
--- a/include/common/aarch64/assert_macros.S
+++ b/include/common/aarch64/assert_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __ASSERT_MACROS_S__
-#define __ASSERT_MACROS_S__
+#ifndef ASSERT_MACROS_S
+#define ASSERT_MACROS_S
 
 	/*
 	 * Assembler macro to enable asm_assert. Use this macro wherever
@@ -26,4 +26,4 @@
 	b	asm_assert ;\
 300:
 
-#endif /* __ASSERT_MACROS_S__ */
+#endif /* ASSERT_MACROS_S */
diff --git a/include/common/aarch64/console_macros.S b/include/common/aarch64/console_macros.S
index b285ecc..5c88d4f 100644
--- a/include/common/aarch64/console_macros.S
+++ b/include/common/aarch64/console_macros.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __CONSOLE_MACROS_S__
-#define __CONSOLE_MACROS_S__
+#ifndef CONSOLE_MACROS_S
+#define CONSOLE_MACROS_S
 
 #include <console.h>
 
@@ -84,4 +84,5 @@
 	b	console_register
 	.endm
 #endif /* USE_FINISH_CONSOLE_REG_2 */
-#endif /* __CONSOLE_MACROS_S__ */
+
+#endif /* CONSOLE_MACROS_S */
diff --git a/include/common/aarch64/el3_common_macros.S b/include/common/aarch64/el3_common_macros.S
index 4902583..adfb54e 100644
--- a/include/common/aarch64/el3_common_macros.S
+++ b/include/common/aarch64/el3_common_macros.S
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __EL3_COMMON_MACROS_S__
-#define __EL3_COMMON_MACROS_S__
+#ifndef EL3_COMMON_MACROS_S
+#define EL3_COMMON_MACROS_S
 
 #include <arch.h>
 #include <asm_macros.S>
@@ -341,4 +341,4 @@
 #endif
 	.endm
 
-#endif /* __EL3_COMMON_MACROS_S__ */
+#endif /* EL3_COMMON_MACROS_S */
diff --git a/include/common/asm_macros_common.S b/include/common/asm_macros_common.S
index 081addc..09742af 100644
--- a/include/common/asm_macros_common.S
+++ b/include/common/asm_macros_common.S
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __ASM_MACROS_COMMON_S__
-#define __ASM_MACROS_COMMON_S__
+#ifndef ASM_MACROS_COMMON_S
+#define ASM_MACROS_COMMON_S
 
 	/*
 	 * This macro is used to create a function label and place the
@@ -104,4 +104,4 @@
 	.endm
 
 
-#endif /* __ASM_MACROS_COMMON_S__ */
+#endif /* ASM_MACROS_COMMON_S */
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index 6a79dc3..56c89fc 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __BL_COMMON_H__
-#define __BL_COMMON_H__
+#ifndef BL_COMMON_H
+#define BL_COMMON_H
 
 #include <ep_info.h>
 #include <param_header.h>
@@ -201,4 +201,4 @@
 
 #endif /*__ASSEMBLY__*/
 
-#endif /* __BL_COMMON_H__ */
+#endif /* BL_COMMON_H */
diff --git a/include/common/desc_image_load.h b/include/common/desc_image_load.h
index 1ed2b15..6254895 100644
--- a/include/common/desc_image_load.h
+++ b/include/common/desc_image_load.h
@@ -3,8 +3,8 @@
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
-#ifndef __DESC_IMAGE_LOAD_H__
-#define __DESC_IMAGE_LOAD_H__
+#ifndef DESC_IMAGE_LOAD_H
+#define DESC_IMAGE_LOAD_H
 
 #include <bl_common.h>
 
@@ -37,4 +37,4 @@
 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);
 
-#endif /* __DESC_IMAGE_LOAD_H__ */
+#endif /* DESC_IMAGE_LOAD_H */
diff --git a/include/common/ep_info.h b/include/common/ep_info.h
index db2355a..0f67687 100644
--- a/include/common/ep_info.h
+++ b/include/common/ep_info.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __EP_INFO_H__
-#define __EP_INFO_H__
+#ifndef EP_INFO_H
+#define EP_INFO_H
 
 #include <param_header.h>
 #include <utils_def.h>
@@ -132,5 +132,4 @@
 
 #endif /*__ASSEMBLY__*/
 
-#endif /* __EP_INFO_H__ */
-
+#endif /* EP_INFO_H */
diff --git a/include/common/fdt_wrappers.h b/include/common/fdt_wrappers.h
index c8d753f..79d001d 100644
--- a/include/common/fdt_wrappers.h
+++ b/include/common/fdt_wrappers.h
@@ -6,8 +6,8 @@
 
 /* Helper functions to offer easier navigation of Device Tree Blob */
 
-#ifndef __FDT_WRAPPERS__
-#define __FDT_WRAPPERS__
+#ifndef FDT_WRAPPERS_H
+#define FDT_WRAPPERS_H
 
 /* Number of cells, given total length in bytes. Each cell is 4 bytes long */
 #define NCELLS(len) ((len) / 4U)
@@ -21,4 +21,4 @@
 int fdtw_write_inplace_cells(void *dtb, int node, const char *prop,
 		unsigned int cells, void *value);
 
-#endif /* __FDT_WRAPPERS__ */
+#endif /* FDT_WRAPPERS_H */
diff --git a/include/common/image_decompress.h b/include/common/image_decompress.h
index aed8df3..bb35c3b 100644
--- a/include/common/image_decompress.h
+++ b/include/common/image_decompress.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __IMAGE_DECOMPRESS_H__
-#define __IMAGE_DECOMPRESS_H__
+#ifndef IMAGE_DECOMPRESS_H
+#define IMAGE_DECOMPRESS_H
 
 #include <stddef.h>
 #include <stdint.h>
@@ -21,4 +21,4 @@
 void image_decompress_prepare(struct image_info *info);
 int image_decompress(struct image_info *info);
 
-#endif /* __IMAGE_DECOMPRESS_H___ */
+#endif /* IMAGE_DECOMPRESS_H */
diff --git a/include/common/interrupt_props.h b/include/common/interrupt_props.h
index 4ac698d..6c6a853 100644
--- a/include/common/interrupt_props.h
+++ b/include/common/interrupt_props.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __INTERRUPT_PROPS_H__
-#define __INTERRUPT_PROPS_H__
+#ifndef INTERRUPT_PROPS_H
+#define INTERRUPT_PROPS_H
 
 #ifndef __ASSEMBLY__
 
@@ -26,4 +26,4 @@
 } interrupt_prop_t;
 
 #endif /* __ASSEMBLY__ */
-#endif /* __INTERRUPT_PROPS_H__ */
+#endif /* INTERRUPT_PROPS_H */
diff --git a/include/common/param_header.h b/include/common/param_header.h
index ec4ee4e..e9717cb 100644
--- a/include/common/param_header.h
+++ b/include/common/param_header.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __PARAM_HEADER_H__
-#define __PARAM_HEADER_H__
+#ifndef PARAM_HEADER_H
+#define PARAM_HEADER_H
 
 #include <stdbool.h>
 #include <utils_def.h>
@@ -54,5 +54,4 @@
 
 #endif /*__ASSEMBLY__*/
 
-#endif /* __PARAM_HEADER_H__ */
-
+#endif /* PARAM_HEADER_H */
diff --git a/include/common/romlib.h b/include/common/romlib.h
index 81a6f5c..7f53c47 100644
--- a/include/common/romlib.h
+++ b/include/common/romlib.h
@@ -4,7 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef ROMLIB_H_
+#ifndef ROMLIB_H
+#define ROMLIB_H
 
 #define ROMLIB_MAJOR   0
 #define ROMLIB_MINOR   1
@@ -12,4 +13,4 @@
 
 int rom_lib_init(int version);
 
-#endif
+#endif /* ROMLIB_H */
diff --git a/include/common/tbbr/cot_def.h b/include/common/tbbr/cot_def.h
index 4a2a8ef..33350a0 100644
--- a/include/common/tbbr/cot_def.h
+++ b/include/common/tbbr/cot_def.h
@@ -4,11 +4,11 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __COT_DEF_H__
-#define __COT_DEF_H__
+#ifndef COT_DEF_H
+#define COT_DEF_H
 
 /* TBBR CoT definitions */
 
 #define COT_MAX_VERIFIED_PARAMS		4
 
-#endif /* __COT_DEF_H__ */
+#endif /* COT_DEF_H */
diff --git a/include/common/tbbr/tbbr_img_def.h b/include/common/tbbr/tbbr_img_def.h
index 96bfb53..bd8f5dc 100644
--- a/include/common/tbbr/tbbr_img_def.h
+++ b/include/common/tbbr/tbbr_img_def.h
@@ -4,8 +4,8 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#ifndef __TBBR_IMG_DEF_H__
-#define __TBBR_IMG_DEF_H__
+#ifndef TBBR_IMG_DEF_H
+#define TBBR_IMG_DEF_H
 
 #include <utils_def.h>
 
@@ -86,4 +86,4 @@
 /* Define size of the array */
 #define MAX_NUMBER_IDS			U(30)
 
-#endif /* __TBBR_IMG_DEF_H__ */
+#endif /* TBBR_IMG_DEF_H */