diff --git a/docs/porting-guide.md b/docs/porting-guide.md index cdb722a..687781a 100644 --- a/docs/porting-guide.md +++ b/docs/porting-guide.md @@ -85,7 +85,7 @@ possible for the firmware to place variables in it using the following C code directive: - __attribute__ ((section("bakery_lock"))) + __section("bakery_lock") Or alternatively the following assembler code directive: diff --git a/drivers/io/io_fip.c b/drivers/io/io_fip.c index d291423..99cf15b 100644 --- a/drivers/io/io_fip.c +++ b/drivers/io/io_fip.c @@ -128,7 +128,7 @@ /* Open a connection to the FIP device */ -static int fip_dev_open(const uintptr_t dev_spec __attribute__((unused)), +static int fip_dev_open(const uintptr_t dev_spec __unused, io_dev_info_t **dev_info) { assert(dev_info != NULL); diff --git a/drivers/io/io_memmap.c b/drivers/io/io_memmap.c index d45107e..ff4efa8 100644 --- a/drivers/io/io_memmap.c +++ b/drivers/io/io_memmap.c @@ -95,7 +95,7 @@ /* Open a connection to the memmap device */ -static int memmap_dev_open(const uintptr_t dev_spec __attribute__((unused)), +static int memmap_dev_open(const uintptr_t dev_spec __unused, io_dev_info_t **dev_info) { assert(dev_info != NULL); diff --git a/drivers/io/io_semihosting.c b/drivers/io/io_semihosting.c index 63d0f68..30ca99c 100644 --- a/drivers/io/io_semihosting.c +++ b/drivers/io/io_semihosting.c @@ -91,7 +91,7 @@ /* Open a file on the semi-hosting device */ -static int sh_file_open(io_dev_info_t *dev_info __attribute__((unused)), +static int sh_file_open(io_dev_info_t *dev_info __unused, const uintptr_t spec, io_entity_t *entity) { int result = -ENOENT; diff --git a/include/bl31/runtime_svc.h b/include/bl31/runtime_svc.h index 87f2dd2..03f906e 100644 --- a/include/bl31/runtime_svc.h +++ b/include/bl31/runtime_svc.h @@ -88,7 +88,7 @@ */ #define DECLARE_RT_SVC(_name, _start, _end, _type, _setup, _smch) \ static const rt_svc_desc_t __svc_desc_ ## _name \ - __attribute__ ((section("rt_svc_descs"), used)) = { \ + __section("rt_svc_descs") __used = { \ .start_oen = _start, \ .end_oen = _end, \ .call_type = _type, \ diff --git a/include/drivers/auth/img_parser_mod.h b/include/drivers/auth/img_parser_mod.h index d80e0fb..79d7d79 100644 --- a/include/drivers/auth/img_parser_mod.h +++ b/include/drivers/auth/img_parser_mod.h @@ -77,7 +77,7 @@ /* Macro to register an image parser library */ #define REGISTER_IMG_PARSER_LIB(_type, _name, _init, _check_int, _get_param) \ static const img_parser_lib_desc_t __img_parser_lib_desc_##_type \ - __attribute__ ((section(".img_parser_lib_descs"), used)) = { \ + __section(".img_parser_lib_descs") __used = { \ .img_type = _type, \ .name = _name, \ .init = _init, \ diff --git a/include/lib/bakery_lock.h b/include/lib/bakery_lock.h index 86adb9c..8a53891 100644 --- a/include/lib/bakery_lock.h +++ b/include/lib/bakery_lock.h @@ -100,8 +100,7 @@ void bakery_lock_get(bakery_lock_t *bakery); void bakery_lock_release(bakery_lock_t *bakery); -#define DEFINE_BAKERY_LOCK(_name) bakery_lock_t _name \ - __attribute__ ((section("bakery_lock"))) +#define DEFINE_BAKERY_LOCK(_name) bakery_lock_t _name __section("bakery_lock") #define DECLARE_BAKERY_LOCK(_name) extern bakery_lock_t _name diff --git a/include/lib/cassert.h b/include/lib/cassert.h index e8089cb..00ee4d5 100644 --- a/include/lib/cassert.h +++ b/include/lib/cassert.h @@ -40,6 +40,6 @@ * compiler warning. ******************************************************************************/ #define CASSERT(cond, msg) \ - typedef char msg[(cond) ? 1 : -1] __attribute__((unused)) + typedef char msg[(cond) ? 1 : -1] __unused #endif /* __CASSERT_H__ */ diff --git a/lib/aarch64/xlat_tables.c b/lib/aarch64/xlat_tables.c index fa1a03d..b00dc0b 100644 --- a/lib/aarch64/xlat_tables.c +++ b/lib/aarch64/xlat_tables.c @@ -58,7 +58,7 @@ __aligned(NUM_L1_ENTRIES * sizeof(uint64_t)); static uint64_t xlat_tables[MAX_XLAT_TABLES][XLAT_TABLE_ENTRIES] -__aligned(XLAT_TABLE_SIZE) __attribute__((section("xlat_table"))); +__aligned(XLAT_TABLE_SIZE) __section("xlat_table"); static unsigned next_xlat; static unsigned long max_pa; diff --git a/plat/arm/common/arm_io_storage.c b/plat/arm/common/arm_io_storage.c index 8c5845c..153fdfe 100644 --- a/plat/arm/common/arm_io_storage.c +++ b/plat/arm/common/arm_io_storage.c @@ -277,9 +277,9 @@ } int plat_arm_get_alt_image_source( - unsigned int image_id __attribute__((unused)), - uintptr_t *dev_handle __attribute__((unused)), - uintptr_t *image_spec __attribute__((unused))) + unsigned int image_id __unused, + uintptr_t *dev_handle __unused, + uintptr_t *image_spec __unused) { /* By default do not try an alternative */ return -ENOENT; diff --git a/plat/mediatek/mt8173/drivers/spm/spm.c b/plat/mediatek/mt8173/drivers/spm/spm.c index 7c6d72b..2801925 100644 --- a/plat/mediatek/mt8173/drivers/spm/spm.c +++ b/plat/mediatek/mt8173/drivers/spm/spm.c @@ -55,9 +55,9 @@ DEFINE_BAKERY_LOCK(spm_lock); -static int spm_hotplug_ready __attribute__ ((section("tzfw_coherent_mem"))); -static int spm_mcdi_ready __attribute__ ((section("tzfw_coherent_mem"))); -static int spm_suspend_ready __attribute__ ((section("tzfw_coherent_mem"))); +static int spm_hotplug_ready __section("tzfw_coherent_mem"); +static int spm_mcdi_ready __section("tzfw_coherent_mem"); +static int spm_suspend_ready __section("tzfw_coherent_mem"); void spm_lock_init(void) { diff --git a/services/std_svc/psci/psci_common.c b/services/std_svc/psci/psci_common.c index 7332695..465c5fd 100644 --- a/services/std_svc/psci/psci_common.c +++ b/services/std_svc/psci/psci_common.c @@ -74,7 +74,7 @@ ******************************************************************************/ non_cpu_pd_node_t psci_non_cpu_pd_nodes[PSCI_NUM_NON_CPU_PWR_DOMAINS] #if USE_COHERENT_MEM -__attribute__ ((section("tzfw_coherent_mem"))) +__section("tzfw_coherent_mem") #endif ;