Commit 33def849 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

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/75393e5ddc272dc7403de74d645e6c6e0f4e70eb.camel@perches.com/2-convert_section.pl



Signed-off-by: default avatarJoe Perches <joe@perches.com>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@gooogle.com>
Reviewed-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 986b9eac
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -64,15 +64,15 @@
#else	/* !__ASSEMBLY__ */

#ifdef CONFIG_ARC_HAS_ICCM
#define __arcfp_code __section(.text.arcfp)
#define __arcfp_code __section(".text.arcfp")
#else
#define __arcfp_code __section(.text)
#define __arcfp_code __section(".text")
#endif

#ifdef CONFIG_ARC_HAS_DCCM
#define __arcfp_data __section(.data.arcfp)
#define __arcfp_data __section(".data.arcfp")
#else
#define __arcfp_data __section(.data)
#define __arcfp_data __section(".data")
#endif

#endif /* __ASSEMBLY__ */
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ extern const struct machine_desc __arch_info_begin[], __arch_info_end[];
 */
#define MACHINE_START(_type, _name)			\
static const struct machine_desc __mach_desc_##_type	\
__used __section(.arch.info.init) = {			\
__used __section(".arch.info.init") = {			\
	.name		= _name,

#define MACHINE_END				\
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
#include <asm/io.h>
#include <asm/mach_desc.h>

int arc_hsdk_axi_dmac_coherent __section(.data) = 0;
int arc_hsdk_axi_dmac_coherent __section(".data") = 0;

#define ARC_CCM_UNUSED_ADDR	0x60000000

+1 −1
Original line number Diff line number Diff line
@@ -24,6 +24,6 @@
#define ARCH_SLAB_MINALIGN 8
#endif

#define __read_mostly __attribute__((__section__(".data..read_mostly")))
#define __read_mostly __section(".data..read_mostly")

#endif
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ struct of_cpuidle_method {

#define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops)			\
	static const struct of_cpuidle_method __cpuidle_method_of_table_##name \
	__used __section(__cpuidle_method_of_table)			\
	__used __section("__cpuidle_method_of_table")			\
	= { .method = _method, .ops = _ops }

extern int arm_cpuidle_suspend(int index);
Loading