Skip to content

Commit

Permalink
core: prefix header file guard names with __
Browse files Browse the repository at this point in the history
Improves header files guard names consistency by using a __ prefix
where missing.

Reviewed-by: Jens Wiklander <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
  • Loading branch information
etienne-lms authored and jforissier committed Oct 23, 2023
1 parent fbe66cf commit d50fee0
Show file tree
Hide file tree
Showing 54 changed files with 159 additions and 159 deletions.
6 changes: 3 additions & 3 deletions core/arch/arm/include/arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2015, Linaro Limited
* Copyright (c) 2019-2023, Arm Limited. All rights reserved.
*/
#ifndef ARM_H
#define ARM_H
#ifndef __ARM_H
#define __ARM_H

#include <stdbool.h>
#include <stdint.h>
Expand Down Expand Up @@ -200,4 +200,4 @@ static inline bool feat_pauth_is_implemented(void)

#endif

#endif /*ARM_H*/
#endif /*__ARM_H*/
6 changes: 3 additions & 3 deletions core/arch/arm/include/arm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Copyright (c) 2014, STMicroelectronics International N.V.
*/

#ifndef ARM32_H
#define ARM32_H
#ifndef __ARM32_H
#define __ARM32_H

#include <compiler.h>
#include <sys/cdefs.h>
Expand Down Expand Up @@ -278,4 +278,4 @@ static __always_inline __noprof uint32_t read_r7(void)

#endif /*__ASSEMBLER__*/

#endif /*ARM32_H*/
#endif /*__ARM32_H*/
6 changes: 3 additions & 3 deletions core/arch/arm/include/arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2015, Linaro Limited
* Copyright (c) 2023, Arm Limited
*/
#ifndef ARM64_H
#define ARM64_H
#ifndef __ARM64_H
#define __ARM64_H

#include <compiler.h>
#include <sys/cdefs.h>
Expand Down Expand Up @@ -504,5 +504,5 @@ static inline void write_pan_disable(void)

#endif /*__ASSEMBLER__*/

#endif /*ARM64_H*/
#endif /*__ARM64_H*/

6 changes: 3 additions & 3 deletions core/arch/arm/include/kernel/misc_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2014, STMicroelectronics International N.V.
*/

#ifndef KERNEL_MISC_ARCH_H
#define KERNEL_MISC_ARCH_H
#ifndef __KERNEL_MISC_ARCH_H
#define __KERNEL_MISC_ARCH_H

#include <arm.h>
#include <kernel/thread.h>
Expand All @@ -17,4 +17,4 @@ uint32_t read_mode_lr(int cpu_mode);

void wait_cycles(unsigned long cycles);

#endif /*KERNEL_MISC_ARCH_H*/
#endif /*__KERNEL_MISC_ARCH_H*/
6 changes: 3 additions & 3 deletions core/arch/arm/include/kernel/vfp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2015, Linaro Limited
*/

#ifndef KERNEL_VFP_H
#define KERNEL_VFP_H
#ifndef __KERNEL_VFP_H
#define __KERNEL_VFP_H

#include <types_ext.h>
#include <compiler.h>
Expand Down Expand Up @@ -103,4 +103,4 @@ void vfp_lazy_save_state_final(struct vfp_state *state, bool force_save);
*/
void vfp_lazy_restore_state(struct vfp_state *state, bool full_state);

#endif /*KERNEL_VFP_H*/
#endif /*__KERNEL_VFP_H*/
4 changes: 2 additions & 2 deletions core/arch/arm/include/sm/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef SM_PM_H
#define SM_PM_H
#ifndef __SM_PM_H
#define __SM_PM_H
#include <stdint.h>
#include <types_ext.h>

Expand Down
6 changes: 3 additions & 3 deletions core/arch/arm/include/sm/sm.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Copyright (c) 2014, STMicroelectronics International N.V.
*/

#ifndef SM_SM_H
#define SM_SM_H
#ifndef __SM_SM_H
#define __SM_SM_H

#ifndef __ASSEMBLER__

Expand Down Expand Up @@ -142,4 +142,4 @@ void vector_fiq_entry(uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3,
#define SM_EXIT_TO_NON_SECURE 0
#define SM_EXIT_TO_SECURE 1

#endif /*SM_SM_H*/
#endif /*__SM_SM_H*/
6 changes: 3 additions & 3 deletions core/arch/arm/include/sm/watchdog_smc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/*
* Copyright (C) STMicroelectronics 2023
*/
#ifndef SM_WATCHDOG_SMC_H
#define SM_WATCHDOG_SMC_H
#ifndef __SM_WATCHDOG_SMC_H
#define __SM_WATCHDOG_SMC_H

/*
* This file describes the secure watchdog management service.
Expand Down Expand Up @@ -78,4 +78,4 @@
* a7 Hypervisor Client ID register
*/

#endif /* SM_WATCHDOG_SMC_H */
#endif /* __SM_WATCHDOG_SMC_H */
6 changes: 3 additions & 3 deletions core/arch/arm/include/tee/entry_fast.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Copyright (c) 2014, STMicroelectronics International N.V.
*/

#ifndef TEE_ENTRY_FAST_H
#define TEE_ENTRY_FAST_H
#ifndef __TEE_ENTRY_FAST_H
#define __TEE_ENTRY_FAST_H

#include <kernel/thread.h>

Expand All @@ -30,4 +30,4 @@ size_t tee_entry_generic_get_api_call_count(void);
void tee_entry_fast(struct thread_smc_args *args);
void __tee_entry_fast(struct thread_smc_args *args);

#endif /* TEE_ENTRY_FAST_H */
#endif /* __TEE_ENTRY_FAST_H */
6 changes: 3 additions & 3 deletions core/arch/riscv/include/kernel/misc_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright 2022 NXP
*/

#ifndef KERNEL_MISC_ARCH_H
#define KERNEL_MISC_ARCH_H
#ifndef __KERNEL_MISC_ARCH_H
#define __KERNEL_MISC_ARCH_H

#endif /*KERNEL_MISC_ARCH_H*/
#endif /*__KERNEL_MISC_ARCH_H*/
6 changes: 3 additions & 3 deletions core/arch/riscv/include/riscv.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright 2022-2023 NXP
*/

#ifndef RISCV_H
#define RISCV_H
#ifndef __RISCV_H
#define __RISCV_H

#include <compiler.h>
#include <encoding.h>
Expand Down Expand Up @@ -389,4 +389,4 @@ static inline __noprof uint32_t read_cntfrq(void)

#endif /*__ASSEMBLER__*/

#endif /*RISCV_H*/
#endif /*__RISCV_H*/
6 changes: 3 additions & 3 deletions core/arch/riscv/include/sbi.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright 2022 NXP
*/

#ifndef SBI_H
#define SBI_H
#ifndef __SBI_H
#define __SBI_H

#if defined(CFG_RISCV_SBI)

Expand Down Expand Up @@ -44,4 +44,4 @@ int sbi_boot_hart(uint32_t hart_id, paddr_t start_addr, unsigned long arg);

#endif /*__ASSEMBLER__*/
#endif /*defined(CFG_RISCV_SBI)*/
#endif /*SBI_H*/
#endif /*__SBI_H*/
6 changes: 3 additions & 3 deletions core/arch/riscv/include/tee/entry_fast.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Copyright (c) 2014, STMicroelectronics International N.V.
*/

#ifndef TEE_ENTRY_FAST_H
#define TEE_ENTRY_FAST_H
#ifndef __TEE_ENTRY_FAST_H
#define __TEE_ENTRY_FAST_H

#include <kernel/thread.h>

Expand All @@ -31,4 +31,4 @@ size_t tee_entry_generic_get_api_call_count(void);
void tee_entry_fast(struct thread_abi_args *args);
void __tee_entry_fast(struct thread_abi_args *args);

#endif /* TEE_ENTRY_FAST_H */
#endif /* __TEE_ENTRY_FAST_H */
6 changes: 3 additions & 3 deletions core/include/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2017, Linaro Limited
*/

#ifndef BENCH_H
#define BENCH_H
#ifndef __BENCH_H
#define __BENCH_H

#include <inttypes.h>
#include <mm/core_memprot.h>
Expand Down Expand Up @@ -57,4 +57,4 @@ void bm_timestamp(void);
static inline void bm_timestamp(void) {}
#endif /* CFG_TEE_BENCHMARK */

#endif /* BENCH_H */
#endif /* __BENCH_H */
6 changes: 3 additions & 3 deletions core/include/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2014, Linaro Limited
*/

#ifndef CONSOLE_H
#define CONSOLE_H
#ifndef __CONSOLE_H
#define __CONSOLE_H

#include <compiler.h>
#include <tee_api_types.h>
Expand Down Expand Up @@ -51,5 +51,5 @@ static inline void configure_console_from_dt(void)
{}
#endif /* !CFG_DT */

#endif /* CONSOLE_H */
#endif /* __CONSOLE_H */

6 changes: 3 additions & 3 deletions core/include/crypto/sm2-kdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* Copyright (c) 2020-2021, Huawei Technologies Co., Ltd
*/

#ifndef CRYPTO_SM2_KDF_H
#define CRYPTO_SM2_KDF_H
#ifndef __CRYPTO_SM2_KDF_H
#define __CRYPTO_SM2_KDF_H

#include <stdint.h>
#include <tee_api_types.h>

TEE_Result sm2_kdf(const uint8_t *Z, size_t Z_len, uint8_t *t, size_t tlen);
#endif /* CRYPTO_SM2_KDF_H */
#endif /* __CRYPTO_SM2_KDF_H */
6 changes: 3 additions & 3 deletions core/include/drivers/cbmem_console.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/*
* Copyright (c) 2023, Google Limited
*/
#ifndef DRIVERS_CBMEM_CONSOLE_H
#define DRIVERS_CBMEM_CONSOLE_H
#ifndef __DRIVERS_CBMEM_CONSOLE_H
#define __DRIVERS_CBMEM_CONSOLE_H

#include <stdbool.h>

bool cbmem_console_init_from_dt(void *fdt);

#endif /* DRIVERS_CBMEM_CONSOLE_H */
#endif /* __DRIVERS_CBMEM_CONSOLE_H */

6 changes: 3 additions & 3 deletions core/include/drivers/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2016, Linaro Limited
*/

#ifndef DRIVERS_GPIO_H
#define DRIVERS_GPIO_H
#ifndef __DRIVERS_GPIO_H
#define __DRIVERS_GPIO_H

#include <assert.h>
#include <dt-bindings/gpio/gpio.h>
Expand Down Expand Up @@ -219,4 +219,4 @@ static inline TEE_Result gpio_register_provider(const void *fdt, int nodeoffset,
data, DT_DRIVER_GPIO);
}

#endif /* DRIVERS_GPIO_H */
#endif /* __DRIVERS_GPIO_H */
6 changes: 3 additions & 3 deletions core/include/drivers/plic.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright 2022-2023 NXP
*/

#ifndef DRIVERS_PLIC_H
#define DRIVERS_PLIC_H
#ifndef __DRIVERS_PLIC_H
#define __DRIVERS_PLIC_H

#include <kernel/interrupt.h>
#include <kernel/misc.h>
Expand All @@ -15,4 +15,4 @@ void plic_hart_init(void);
void plic_it_handle(void);
void plic_dump_state(void);

#endif /*DRIVERS_PLIC_H*/
#endif /*__DRIVERS_PLIC_H*/
6 changes: 3 additions & 3 deletions core/include/drivers/regulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/*
* Copyright (c) 2023, STMicroelectronics
*/
#ifndef DRIVERS_REGULATOR_H
#define DRIVERS_REGULATOR_H
#ifndef __DRIVERS_REGULATOR_H
#define __DRIVERS_REGULATOR_H

#include <assert.h>
#include <bitstring.h>
Expand Down Expand Up @@ -315,4 +315,4 @@ static inline void regulator_get_range(struct regulator *regulator, int *min_uv,
*/
TEE_Result regulator_supported_voltages(struct regulator *regulator,
struct regulator_voltages **voltages);
#endif /* DRIVERS_REGULATOR_H */
#endif /* __DRIVERS_REGULATOR_H */
6 changes: 3 additions & 3 deletions core/include/drivers/rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright 2022 Microchip.
*/

#ifndef DRIVERS_RTC_H
#define DRIVERS_RTC_H
#ifndef __DRIVERS_RTC_H
#define __DRIVERS_RTC_H

#include <tee_api_types.h>
#include <util.h>
Expand Down Expand Up @@ -127,4 +127,4 @@ static inline TEE_Result rtc_set_offset(long offset __unused)
return TEE_ERROR_NOT_SUPPORTED;
}
#endif
#endif /* DRIVERS_RTC_H */
#endif /* __DRIVERS_RTC_H */
6 changes: 3 additions & 3 deletions core/include/drivers/stm32_gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2017-2023, STMicroelectronics
*/

#ifndef DRIVERS_STM32_GPIO_H
#define DRIVERS_STM32_GPIO_H
#ifndef __DRIVERS_STM32_GPIO_H
#define __DRIVERS_STM32_GPIO_H

#include <assert.h>
#include <drivers/pinctrl.h>
Expand Down Expand Up @@ -68,4 +68,4 @@ static inline void stm32_gpio_pinctrl_bank_pin(struct pinctrl_state *p __unused,
{
}
#endif /*CFG_STM32_GPIO*/
#endif /*DRIVERS_STM32_GPIO_H*/
#endif /*__DRIVERS_STM32_GPIO_H*/
6 changes: 3 additions & 3 deletions core/include/drivers/stm32_i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2017-2023, STMicroelectronics
*/

#ifndef DRIVERS_STM32_I2C_H
#define DRIVERS_STM32_I2C_H
#ifndef __DRIVERS_STM32_I2C_H
#define __DRIVERS_STM32_I2C_H

#include <drivers/clk.h>
#include <drivers/i2c.h>
Expand Down Expand Up @@ -278,4 +278,4 @@ static inline bool i2c_is_secure(struct i2c_handle_s *hi2c)
return hi2c->dt_status == DT_STATUS_OK_SEC;
}

#endif /* DRIVERS_STM32_I2C_H*/
#endif /* __DRIVERS_STM32_I2C_H*/
6 changes: 3 additions & 3 deletions core/include/drivers/stm32_iwdg.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) 2018-2022, STMicroelectronics - All Rights Reserved
*/

#ifndef DRIVERS_STM32_IWDG_H
#define DRIVERS_STM32_IWDG_H
#ifndef __DRIVERS_STM32_IWDG_H
#define __DRIVERS_STM32_IWDG_H

#include <stdbool.h>

Expand All @@ -30,4 +30,4 @@ TEE_Result stm32_get_iwdg_otp_config(paddr_t pbase,
/* Refresh all registered IWDG watchdog instance */
void stm32_iwdg_refresh(void);

#endif /*DRIVERS_STM32_IWDG_H*/
#endif /*__DRIVERS_STM32_IWDG_H*/
Loading

0 comments on commit d50fee0

Please sign in to comment.