Skip to content

Commit 33def84

Browse files
JoePerchestorvalds
authored andcommitted
treewide: Convert macro and uses of __section(foo) to __section("foo")
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. Conversion done using the script at: https://lore.kernel.org/lkml/[email protected]/2-convert_section.pl Signed-off-by: Joe Perches <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Reviewed-by: Miguel Ojeda <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 986b9ea commit 33def84

File tree

117 files changed

+196
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+196
-196
lines changed

arch/arc/include/asm/linkage.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@
6464
#else /* !__ASSEMBLY__ */
6565

6666
#ifdef CONFIG_ARC_HAS_ICCM
67-
#define __arcfp_code __section(.text.arcfp)
67+
#define __arcfp_code __section(".text.arcfp")
6868
#else
69-
#define __arcfp_code __section(.text)
69+
#define __arcfp_code __section(".text")
7070
#endif
7171

7272
#ifdef CONFIG_ARC_HAS_DCCM
73-
#define __arcfp_data __section(.data.arcfp)
73+
#define __arcfp_data __section(".data.arcfp")
7474
#else
75-
#define __arcfp_data __section(.data)
75+
#define __arcfp_data __section(".data")
7676
#endif
7777

7878
#endif /* __ASSEMBLY__ */

arch/arc/include/asm/mach_desc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extern const struct machine_desc __arch_info_begin[], __arch_info_end[];
5353
*/
5454
#define MACHINE_START(_type, _name) \
5555
static const struct machine_desc __mach_desc_##_type \
56-
__used __section(.arch.info.init) = { \
56+
__used __section(".arch.info.init") = { \
5757
.name = _name,
5858

5959
#define MACHINE_END \

arch/arc/plat-hsdk/platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <asm/io.h>
1414
#include <asm/mach_desc.h>
1515

16-
int arc_hsdk_axi_dmac_coherent __section(.data) = 0;
16+
int arc_hsdk_axi_dmac_coherent __section(".data") = 0;
1717

1818
#define ARC_CCM_UNUSED_ADDR 0x60000000
1919

arch/arm/include/asm/cache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
#define ARCH_SLAB_MINALIGN 8
2525
#endif
2626

27-
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
27+
#define __read_mostly __section(".data..read_mostly")
2828

2929
#endif

arch/arm/include/asm/cpuidle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct of_cpuidle_method {
4242

4343
#define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops) \
4444
static const struct of_cpuidle_method __cpuidle_method_of_table_##name \
45-
__used __section(__cpuidle_method_of_table) \
45+
__used __section("__cpuidle_method_of_table") \
4646
= { .method = _method, .ops = _ops }
4747

4848
extern int arm_cpuidle_suspend(int index);

arch/arm/include/asm/idmap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <linux/pgtable.h>
77

88
/* Tag a function as requiring to be executed via an identity mapping. */
9-
#define __idmap __section(.idmap.text) noinline notrace
9+
#define __idmap __section(".idmap.text") noinline notrace
1010

1111
extern pgd_t *idmap_pgd;
1212

arch/arm/include/asm/mach/arch.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extern const struct machine_desc __arch_info_begin[], __arch_info_end[];
8181
#define MACHINE_START(_type,_name) \
8282
static const struct machine_desc __mach_desc_##_type \
8383
__used \
84-
__attribute__((__section__(".arch.info.init"))) = { \
84+
__section(".arch.info.init") = { \
8585
.nr = MACH_TYPE_##_type, \
8686
.name = _name,
8787

@@ -91,7 +91,7 @@ static const struct machine_desc __mach_desc_##_type \
9191
#define DT_MACHINE_START(_name, _namestr) \
9292
static const struct machine_desc __mach_desc_##_name \
9393
__used \
94-
__attribute__((__section__(".arch.info.init"))) = { \
94+
__section(".arch.info.init") = { \
9595
.nr = ~0, \
9696
.name = _namestr,
9797

arch/arm/include/asm/setup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <uapi/asm/setup.h>
1515

1616

17-
#define __tag __used __attribute__((__section__(".taglist.init")))
17+
#define __tag __used __section(".taglist.init")
1818
#define __tagtable(tag, fn) \
1919
static const struct tagtable __tagtable_##fn __tag = { tag, fn }
2020

arch/arm/include/asm/smp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct of_cpu_method {
112112

113113
#define CPU_METHOD_OF_DECLARE(name, _method, _ops) \
114114
static const struct of_cpu_method __cpu_method_of_table_##name \
115-
__used __section(__cpu_method_of_table) \
115+
__used __section("__cpu_method_of_table") \
116116
= { .method = _method, .ops = _ops }
117117
/*
118118
* set platform specific SMP operations

arch/arm/include/asm/tcm.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
#include <linux/compiler.h>
1717

1818
/* Tag variables with this */
19-
#define __tcmdata __section(.tcm.data)
19+
#define __tcmdata __section(".tcm.data")
2020
/* Tag constants with this */
21-
#define __tcmconst __section(.tcm.rodata)
21+
#define __tcmconst __section(".tcm.rodata")
2222
/* Tag functions inside TCM called from outside TCM with this */
23-
#define __tcmfunc __attribute__((long_call)) __section(.tcm.text) noinline
23+
#define __tcmfunc __attribute__((long_call)) __section(".tcm.text") noinline
2424
/* Tag function inside TCM called from inside TCM with this */
25-
#define __tcmlocalfunc __section(.tcm.text)
25+
#define __tcmlocalfunc __section(".tcm.text")
2626

2727
void *tcm_alloc(size_t len);
2828
void tcm_free(void *addr, size_t len);

0 commit comments

Comments
 (0)