Remove direct usage of __attribute__((foo))
authorSoren Brinkmann <soren.brinkmann@xilinx.com>
Thu, 14 Jan 2016 18:11:05 +0000 (10:11 -0800)
committerSoren Brinkmann <soren.brinkmann@xilinx.com>
Thu, 14 Jan 2016 18:55:17 +0000 (10:55 -0800)
Migrate all direct usage of __attribute__ to usage of their
corresponding macros from cdefs.h.
e.g.:
 - __attribute__((unused)) -> __unused

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
12 files changed:
docs/porting-guide.md
drivers/io/io_fip.c
drivers/io/io_memmap.c
drivers/io/io_semihosting.c
include/bl31/runtime_svc.h
include/drivers/auth/img_parser_mod.h
include/lib/bakery_lock.h
include/lib/cassert.h
lib/aarch64/xlat_tables.c
plat/arm/common/arm_io_storage.c
plat/mediatek/mt8173/drivers/spm/spm.c
services/std_svc/psci/psci_common.c

index cdb722afd3022e987c290349e9c57d910b2da264..687781a5afede1e13c7f7e32ed348b823e69a63f 100644 (file)
@@ -85,7 +85,7 @@ section identified by name `bakery_lock` inside `coherent_ram` so that its
 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:
 
index d2914238052cb4268e71e20f2aa922ae4c2da095..99cf15b970c57755aa2ff30a5ba651734a540c9b 100644 (file)
@@ -128,7 +128,7 @@ static const io_dev_info_t fip_dev_info = {
 
 
 /* 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);
index d45107e516a83f1c263a85f333869fdb97921919..ff4efa89e30ce891ff76deeb39e95d96f712873d 100644 (file)
@@ -95,7 +95,7 @@ static const io_dev_info_t memmap_dev_info = {
 
 
 /* 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);
index 63d0f68ec02a8eb1895f58afcbfa9f264425c4bd..30ca99cb337b0eedd6701e77c29436502332c8c4 100644 (file)
@@ -91,7 +91,7 @@ static int sh_dev_open(const uintptr_t dev_spec __unused,
 
 
 /* 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;
index 87f2dd2c6d3299264106107efa57b8ab7b35035b..03f906ef57656aa741f3bfb2ea18cf74927b75e7 100644 (file)
@@ -88,7 +88,7 @@ typedef struct rt_svc_desc {
  */
 #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, \
index d80e0fb7693935b85730e2b659b7a963d1d970af..79d7d797fe2023ce1dc68f5d1dd7dfd0c9120359 100644 (file)
@@ -77,7 +77,7 @@ int img_parser_get_auth_param(img_type_t img_type,
 /* 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, \
index 86adb9cb145b4d0fe0f4dd676a666e709dab6e9f..8a538917421bb6ad9bbc6c4a5201b9da0771962d 100644 (file)
@@ -100,8 +100,7 @@ inline void bakery_lock_init(bakery_lock_t *bakery) {}
 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
 
index e8089cbbe1ac5555855cdf56c8a9c946640568dc..00ee4d59934d731cd3e9468aa6a996504b03e631 100644 (file)
@@ -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__ */
index fa1a03dabf33e086341e9efe3683cb5d0032939b..b00dc0be1d01a1788beb0f42b6e4a34a71a952af 100644 (file)
@@ -58,7 +58,7 @@ static uint64_t l1_xlation_table[NUM_L1_ENTRIES]
 __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;
index 8c5845ce7373d297879d5ff7bf99766d31fffe35..153fdfe8d88a8aaf556c90f3e154313be5b4e556 100644 (file)
@@ -277,9 +277,9 @@ void plat_arm_io_setup(void)
 }
 
 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;
index 7c6d72bec23e2beee78abfd0f3ebfa60ca0cfcbd..280192568055e7c89f199e308bdbc5182cbd0579 100644 (file)
@@ -55,9 +55,9 @@ static int spm_dormant_sta = CPU_DORMANT_RESET;
 
 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)
 {
index 733269527f13c597cfc81fd28e255de92f70dce3..465c5fd9b3a556814f4271c40164a3726f490805 100644 (file)
@@ -74,7 +74,7 @@ static plat_local_state_t
  ******************************************************************************/
 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
 ;