aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarek BehĂșn2021-05-20 13:23:52 +0200
committerTom Rini2021-05-24 14:21:30 -0400
commit236f2ec43266cb4dabd320381498df6c9d80c82d (patch)
tree3e49eddacb53d4ed87a3417d1b861b2be18402e2 /drivers
parent9ce799aaba104a1f0d36bf84caec4c807fa31baa (diff)
treewide: Convert macro and uses of __section(foo) to __section("foo")
This commit does the same thing as Linux commit 33def8498fdd. Use a more generic form for __section that requires quotes to avoid complications with clang and gcc differences. Remove the quote operator # from compiler_attributes.h __section macro. Convert all unquoted __section(foo) uses to quoted __section("foo"). Also convert __attribute__((section("foo"))) uses to __section("foo") even if the __attribute__ has multiple list entry forms. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bios_emulator/biosemu.c4
-rw-r--r--drivers/clk/kendryte/clk.c4
-rw-r--r--drivers/firmware/psci.c2
-rw-r--r--drivers/pinctrl/nxp/pinctrl-imx5.c2
-rw-r--r--drivers/pinctrl/nxp/pinctrl-imx7.c2
-rw-r--r--drivers/pinctrl/nxp/pinctrl-imx8m.c2
-rw-r--r--drivers/power/pmic/pmic_tps62362.c2
-rw-r--r--drivers/power/pmic/pmic_tps65217.c2
-rw-r--r--drivers/power/pmic/pmic_tps65218.c2
-rw-r--r--drivers/power/pmic/pmic_tps65910.c2
-rw-r--r--drivers/serial/serial_pl01x.c4
11 files changed, 14 insertions, 14 deletions
diff --git a/drivers/bios_emulator/biosemu.c b/drivers/bios_emulator/biosemu.c
index 9d4f07c074d..82befbae66f 100644
--- a/drivers/bios_emulator/biosemu.c
+++ b/drivers/bios_emulator/biosemu.c
@@ -50,7 +50,7 @@
#include "biosemui.h"
BE_sysEnv _BE_env = {{0}};
-static X86EMU_memFuncs _BE_mem __attribute__((section(GOT2_TYPE))) = {
+static X86EMU_memFuncs _BE_mem __section(GOT2_TYPE) = {
BE_rdb,
BE_rdw,
BE_rdl,
@@ -59,7 +59,7 @@ static X86EMU_memFuncs _BE_mem __attribute__((section(GOT2_TYPE))) = {
BE_wrl,
};
-static X86EMU_pioFuncs _BE_pio __attribute__((section(GOT2_TYPE))) = {
+static X86EMU_pioFuncs _BE_pio __section(GOT2_TYPE) = {
BE_inb,
BE_inw,
BE_inl,
diff --git a/drivers/clk/kendryte/clk.c b/drivers/clk/kendryte/clk.c
index 2d6ac03693a..41c712e03f1 100644
--- a/drivers/clk/kendryte/clk.c
+++ b/drivers/clk/kendryte/clk.c
@@ -347,7 +347,7 @@ static const struct k210_comp_params k210_comps[] = {
#undef COMP_NOMUX_ID
#undef COMP_LIST
-static struct clk *k210_bypass_children __section(.data);
+static struct clk *k210_bypass_children __section(".data");
/* Helper functions to create sub-clocks */
static struct clk_mux *k210_create_mux(const struct k210_mux_params *params,
@@ -473,7 +473,7 @@ cleanup_mux:
return comp;
}
-static bool __section(.data) probed;
+static bool __section(".data") probed;
/* reset probed so we will probe again post-relocation */
static int k210_clk_bind(struct udevice *dev)
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 6755e74e3f8..89cb7d88e5b 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -42,7 +42,7 @@
#if CONFIG_IS_ENABLED(EFI_LOADER)
int __efi_runtime_data psci_method;
#else
-int psci_method __attribute__ ((section(".data")));
+int psci_method __section(".data");
#endif
unsigned long __efi_runtime invoke_psci_fn
diff --git a/drivers/pinctrl/nxp/pinctrl-imx5.c b/drivers/pinctrl/nxp/pinctrl-imx5.c
index 71e0c94c96e..b32b748cfc6 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx5.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx5.c
@@ -10,7 +10,7 @@
#include "pinctrl-imx.h"
-static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info __attribute__((section(".data")));
+static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info __section(".data");
static int imx5_pinctrl_probe(struct udevice *dev)
{
diff --git a/drivers/pinctrl/nxp/pinctrl-imx7.c b/drivers/pinctrl/nxp/pinctrl-imx7.c
index 8301413ac7e..77ddb8e0b9d 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx7.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx7.c
@@ -9,7 +9,7 @@
#include "pinctrl-imx.h"
-static struct imx_pinctrl_soc_info imx7_pinctrl_soc_info __attribute__((section(".data")));
+static struct imx_pinctrl_soc_info imx7_pinctrl_soc_info __section(".data");
static struct imx_pinctrl_soc_info imx7_lpsr_pinctrl_soc_info = {
.flags = ZERO_OFFSET_VALID,
diff --git a/drivers/pinctrl/nxp/pinctrl-imx8m.c b/drivers/pinctrl/nxp/pinctrl-imx8m.c
index 99c6d014d6c..6ea66a080b2 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx8m.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx8m.c
@@ -8,7 +8,7 @@
#include "pinctrl-imx.h"
-static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info __attribute__((section(".data")));
+static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info __section(".data");
static int imx8mq_pinctrl_probe(struct udevice *dev)
{
diff --git a/drivers/power/pmic/pmic_tps62362.c b/drivers/power/pmic/pmic_tps62362.c
index 76fd14db59d..59190d6f672 100644
--- a/drivers/power/pmic/pmic_tps62362.c
+++ b/drivers/power/pmic/pmic_tps62362.c
@@ -11,7 +11,7 @@
#include <power/tps62362.h>
#if CONFIG_IS_ENABLED(DM_I2C)
-struct udevice *tps62362_dev __attribute__((section(".data"))) = NULL;
+struct udevice *tps62362_dev __section(".data") = NULL;
#endif
/**
diff --git a/drivers/power/pmic/pmic_tps65217.c b/drivers/power/pmic/pmic_tps65217.c
index 54b5bed99ad..c7f532df4d5 100644
--- a/drivers/power/pmic/pmic_tps65217.c
+++ b/drivers/power/pmic/pmic_tps65217.c
@@ -8,7 +8,7 @@
#include <i2c.h>
#include <power/tps65217.h>
-struct udevice *tps65217_dev __attribute__((section(".data"))) = NULL;
+struct udevice *tps65217_dev __section(".data") = NULL;
/**
* tps65217_reg_read() - Generic function that can read a TPS65217 register
diff --git a/drivers/power/pmic/pmic_tps65218.c b/drivers/power/pmic/pmic_tps65218.c
index f8bae4545c4..67174901804 100644
--- a/drivers/power/pmic/pmic_tps65218.c
+++ b/drivers/power/pmic/pmic_tps65218.c
@@ -86,7 +86,7 @@ int tps65218_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val,
return 0;
}
#else
-struct udevice *tps65218_dev __attribute__((section(".data"))) = NULL;
+struct udevice *tps65218_dev __section(".data") = NULL;
int tps65218_reg_read(uchar dest_reg, uchar *dest_val)
{
diff --git a/drivers/power/pmic/pmic_tps65910.c b/drivers/power/pmic/pmic_tps65910.c
index 84a58c28d8f..fcd0a654a88 100644
--- a/drivers/power/pmic/pmic_tps65910.c
+++ b/drivers/power/pmic/pmic_tps65910.c
@@ -8,7 +8,7 @@
#include <i2c.h>
#include <power/tps65910.h>
-struct udevice *tps65910_dev __attribute__((section(".data"))) = NULL;
+struct udevice *tps65910_dev __section(".data") = NULL;
static inline int tps65910_read_reg(int addr, uchar *buf)
{
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 4f9de0da767..5283d5ed118 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -30,8 +30,8 @@ DECLARE_GLOBAL_DATA_PTR;
#ifndef CONFIG_DM_SERIAL
static volatile unsigned char *const port[] = CONFIG_PL01x_PORTS;
-static enum pl01x_type pl01x_type __attribute__ ((section(".data")));
-static struct pl01x_regs *base_regs __attribute__ ((section(".data")));
+static enum pl01x_type pl01x_type __section(".data");
+static struct pl01x_regs *base_regs __section(".data");
#define NUM_PORTS (sizeof(port)/sizeof(port[0]))
#endif