mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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: Joe Perches <joe@perches.com> Reviewed-by: Nick Desaulniers <ndesaulniers@gooogle.com> Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
986b9eacb2
commit
33def8498f
@@ -47,11 +47,11 @@
|
||||
|
||||
/* These are for everybody (although not all archs will actually
|
||||
discard it in modules) */
|
||||
#define __init __section(.init.text) __cold __latent_entropy __noinitretpoline
|
||||
#define __initdata __section(.init.data)
|
||||
#define __initconst __section(.init.rodata)
|
||||
#define __exitdata __section(.exit.data)
|
||||
#define __exit_call __used __section(.exitcall.exit)
|
||||
#define __init __section(".init.text") __cold __latent_entropy __noinitretpoline
|
||||
#define __initdata __section(".init.data")
|
||||
#define __initconst __section(".init.rodata")
|
||||
#define __exitdata __section(".exit.data")
|
||||
#define __exit_call __used __section(".exitcall.exit")
|
||||
|
||||
/*
|
||||
* modpost check for section mismatches during the kernel build.
|
||||
@@ -70,9 +70,9 @@
|
||||
*
|
||||
* The markers follow same syntax rules as __init / __initdata.
|
||||
*/
|
||||
#define __ref __section(.ref.text) noinline
|
||||
#define __refdata __section(.ref.data)
|
||||
#define __refconst __section(.ref.rodata)
|
||||
#define __ref __section(".ref.text") noinline
|
||||
#define __refdata __section(".ref.data")
|
||||
#define __refconst __section(".ref.rodata")
|
||||
|
||||
#ifdef MODULE
|
||||
#define __exitused
|
||||
@@ -80,16 +80,16 @@
|
||||
#define __exitused __used
|
||||
#endif
|
||||
|
||||
#define __exit __section(.exit.text) __exitused __cold notrace
|
||||
#define __exit __section(".exit.text") __exitused __cold notrace
|
||||
|
||||
/* Used for MEMORY_HOTPLUG */
|
||||
#define __meminit __section(.meminit.text) __cold notrace \
|
||||
#define __meminit __section(".meminit.text") __cold notrace \
|
||||
__latent_entropy
|
||||
#define __meminitdata __section(.meminit.data)
|
||||
#define __meminitconst __section(.meminit.rodata)
|
||||
#define __memexit __section(.memexit.text) __exitused __cold notrace
|
||||
#define __memexitdata __section(.memexit.data)
|
||||
#define __memexitconst __section(.memexit.rodata)
|
||||
#define __meminitdata __section(".meminit.data")
|
||||
#define __meminitconst __section(".meminit.rodata")
|
||||
#define __memexit __section(".memexit.text") __exitused __cold notrace
|
||||
#define __memexitdata __section(".memexit.data")
|
||||
#define __memexitconst __section(".memexit.rodata")
|
||||
|
||||
/* For assembly routines */
|
||||
#define __HEAD .section ".head.text","ax"
|
||||
@@ -254,7 +254,7 @@ struct obs_kernel_param {
|
||||
static const char __setup_str_##unique_id[] __initconst \
|
||||
__aligned(1) = str; \
|
||||
static struct obs_kernel_param __setup_##unique_id \
|
||||
__used __section(.init.setup) \
|
||||
__used __section(".init.setup") \
|
||||
__attribute__((aligned((sizeof(long))))) \
|
||||
= { __setup_str_##unique_id, fn, early }
|
||||
|
||||
@@ -298,7 +298,7 @@ void __init parse_early_options(char *cmdline);
|
||||
#endif
|
||||
|
||||
/* Data marked not to be saved by software suspend */
|
||||
#define __nosavedata __section(.data..nosave)
|
||||
#define __nosavedata __section(".data..nosave")
|
||||
|
||||
#ifdef MODULE
|
||||
#define __exit_p(x) x
|
||||
|
Reference in New Issue
Block a user