diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-01-24 16:16:20 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2008-01-28 17:21:18 -0500 |
commit | 3ff6eecca4e5c49a5d1dd8b58ea0e20102ce08f0 (patch) | |
tree | 9af53a5ce0054520be6d572f988a76f3ab4ef0c0 | |
parent | bc395add945659e04cc7cf250755ba0edc1a9fdc (diff) |
remove __attribute_used__
Remove the deprecated __attribute_used__.
[Introduce __section in a few places to silence checkpatch /sam]
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r-- | arch/alpha/lib/dec_and_lock.c | 3 | ||||
-rw-r--r-- | arch/powerpc/boot/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 2 | ||||
-rw-r--r-- | arch/powerpc/oprofile/op_model_power4.c | 6 | ||||
-rw-r--r-- | arch/sparc64/kernel/unaligned.c | 2 | ||||
-rw-r--r-- | arch/um/include/init.h | 26 | ||||
-rw-r--r-- | drivers/rapidio/rio.h | 4 | ||||
-rw-r--r-- | fs/compat_ioctl.c | 2 | ||||
-rw-r--r-- | include/asm-avr32/setup.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/gcc_intrin.h | 2 | ||||
-rw-r--r-- | include/asm-sh/machvec.h | 2 | ||||
-rw-r--r-- | include/asm-sh/thread_info.h | 2 | ||||
-rw-r--r-- | include/asm-x86/thread_info_32.h | 2 | ||||
-rw-r--r-- | include/linux/compiler-gcc3.h | 2 | ||||
-rw-r--r-- | include/linux/compiler-gcc4.h | 1 | ||||
-rw-r--r-- | include/linux/compiler.h | 4 | ||||
-rw-r--r-- | include/linux/elfnote.h | 2 | ||||
-rw-r--r-- | include/linux/init.h | 11 | ||||
-rw-r--r-- | include/linux/module.h | 4 | ||||
-rw-r--r-- | include/linux/moduleparam.h | 4 | ||||
-rw-r--r-- | include/linux/pci.h | 2 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 4 |
22 files changed, 41 insertions, 50 deletions
diff --git a/arch/alpha/lib/dec_and_lock.c b/arch/alpha/lib/dec_and_lock.c index 6ae2500a9d9e..0f5520d2f45f 100644 --- a/arch/alpha/lib/dec_and_lock.c +++ b/arch/alpha/lib/dec_and_lock.c | |||
@@ -30,8 +30,7 @@ _atomic_dec_and_lock: \n\ | |||
30 | .previous \n\ | 30 | .previous \n\ |
31 | .end _atomic_dec_and_lock"); | 31 | .end _atomic_dec_and_lock"); |
32 | 32 | ||
33 | static int __attribute_used__ | 33 | static int __used atomic_dec_and_lock_1(atomic_t *atomic, spinlock_t *lock) |
34 | atomic_dec_and_lock_1(atomic_t *atomic, spinlock_t *lock) | ||
35 | { | 34 | { |
36 | /* Slow path */ | 35 | /* Slow path */ |
37 | spin_lock(lock); | 36 | spin_lock(lock); |
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 18e32719d0ed..4b1d98b8135e 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -65,7 +65,7 @@ obj-wlib := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-wlib)))) | |||
65 | obj-plat := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-plat)))) | 65 | obj-plat := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-plat)))) |
66 | 66 | ||
67 | quiet_cmd_copy_zlib = COPY $@ | 67 | quiet_cmd_copy_zlib = COPY $@ |
68 | cmd_copy_zlib = sed "s@__attribute_used__@@;s@<linux/\([^>]*\).*@\"\1\"@" $< > $@ | 68 | cmd_copy_zlib = sed "s@__used@@;s@<linux/\([^>]*\).*@\"\1\"@" $< > $@ |
69 | 69 | ||
70 | quiet_cmd_copy_zlibheader = COPY $@ | 70 | quiet_cmd_copy_zlibheader = COPY $@ |
71 | cmd_copy_zlibheader = sed "s@<linux/\([^>]*\).*@\"\1\"@" $< > $@ | 71 | cmd_copy_zlibheader = sed "s@<linux/\([^>]*\).*@\"\1\"@" $< > $@ |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 25d9a96484dd..c8127f832df0 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -158,7 +158,7 @@ static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ | |||
158 | unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ | 158 | unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ |
159 | return sprintf(buf, "%lx\n", val); \ | 159 | return sprintf(buf, "%lx\n", val); \ |
160 | } \ | 160 | } \ |
161 | static ssize_t __attribute_used__ \ | 161 | static ssize_t __used \ |
162 | store_##NAME(struct sys_device *dev, const char *buf, size_t count) \ | 162 | store_##NAME(struct sys_device *dev, const char *buf, size_t count) \ |
163 | { \ | 163 | { \ |
164 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ | 164 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index cddc250a6a5c..446a8bbb847b 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
@@ -172,15 +172,15 @@ static void power4_stop(void) | |||
172 | } | 172 | } |
173 | 173 | ||
174 | /* Fake functions used by canonicalize_pc */ | 174 | /* Fake functions used by canonicalize_pc */ |
175 | static void __attribute_used__ hypervisor_bucket(void) | 175 | static void __used hypervisor_bucket(void) |
176 | { | 176 | { |
177 | } | 177 | } |
178 | 178 | ||
179 | static void __attribute_used__ rtas_bucket(void) | 179 | static void __used rtas_bucket(void) |
180 | { | 180 | { |
181 | } | 181 | } |
182 | 182 | ||
183 | static void __attribute_used__ kernel_unknown_bucket(void) | 183 | static void __used kernel_unknown_bucket(void) |
184 | { | 184 | { |
185 | } | 185 | } |
186 | 186 | ||
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index 953be816fa25..dc7bf1b6321c 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c | |||
@@ -175,7 +175,7 @@ unsigned long compute_effective_address(struct pt_regs *regs, | |||
175 | } | 175 | } |
176 | 176 | ||
177 | /* This is just to make gcc think die_if_kernel does return... */ | 177 | /* This is just to make gcc think die_if_kernel does return... */ |
178 | static void __attribute_used__ unaligned_panic(char *str, struct pt_regs *regs) | 178 | static void __used unaligned_panic(char *str, struct pt_regs *regs) |
179 | { | 179 | { |
180 | die_if_kernel(str, regs); | 180 | die_if_kernel(str, regs); |
181 | } | 181 | } |
diff --git a/arch/um/include/init.h b/arch/um/include/init.h index d4de7c0120ce..cebc6cae9190 100644 --- a/arch/um/include/init.h +++ b/arch/um/include/init.h | |||
@@ -42,15 +42,15 @@ typedef void (*exitcall_t)(void); | |||
42 | 42 | ||
43 | /* These are for everybody (although not all archs will actually | 43 | /* These are for everybody (although not all archs will actually |
44 | discard it in modules) */ | 44 | discard it in modules) */ |
45 | #define __init __attribute__ ((__section__ (".init.text"))) | 45 | #define __init __section(.init.text) |
46 | #define __initdata __attribute__ ((__section__ (".init.data"))) | 46 | #define __initdata __section(.init.data) |
47 | #define __exitdata __attribute__ ((__section__(".exit.data"))) | 47 | #define __exitdata __section(.exit.data) |
48 | #define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit"))) | 48 | #define __exit_call __used __section(.exitcall.exit) |
49 | 49 | ||
50 | #ifdef MODULE | 50 | #ifdef MODULE |
51 | #define __exit __attribute__ ((__section__(".exit.text"))) | 51 | #define __exit __section(.exit.text) |
52 | #else | 52 | #else |
53 | #define __exit __attribute_used__ __attribute__ ((__section__(".exit.text"))) | 53 | #define __exit __used __section(.exit.text) |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #endif | 56 | #endif |
@@ -103,16 +103,16 @@ extern struct uml_param __uml_setup_start, __uml_setup_end; | |||
103 | * Mark functions and data as being only used at initialization | 103 | * Mark functions and data as being only used at initialization |
104 | * or exit time. | 104 | * or exit time. |
105 | */ | 105 | */ |
106 | #define __uml_init_setup __attribute_used__ __attribute__ ((__section__ (".uml.setup.init"))) | 106 | #define __uml_init_setup __used __section(.uml.setup.init) |
107 | #define __uml_setup_help __attribute_used__ __attribute__ ((__section__ (".uml.help.init"))) | 107 | #define __uml_setup_help __used __section(.uml.help.init) |
108 | #define __uml_init_call __attribute_used__ __attribute__ ((__section__ (".uml.initcall.init"))) | 108 | #define __uml_init_call __used __section(.uml.initcall.init) |
109 | #define __uml_postsetup_call __attribute_used__ __attribute__ ((__section__ (".uml.postsetup.init"))) | 109 | #define __uml_postsetup_call __used __section(.uml.postsetup.init) |
110 | #define __uml_exit_call __attribute_used__ __attribute__ ((__section__ (".uml.exitcall.exit"))) | 110 | #define __uml_exit_call __used __section(.uml.exitcall.exit) |
111 | 111 | ||
112 | #ifndef __KERNEL__ | 112 | #ifndef __KERNEL__ |
113 | 113 | ||
114 | #define __define_initcall(level,fn) \ | 114 | #define __define_initcall(level,fn) \ |
115 | static initcall_t __initcall_##fn __attribute_used__ \ | 115 | static initcall_t __initcall_##fn __used \ |
116 | __attribute__((__section__(".initcall" level ".init"))) = fn | 116 | __attribute__((__section__(".initcall" level ".init"))) = fn |
117 | 117 | ||
118 | /* Userspace initcalls shouldn't depend on anything in the kernel, so we'll | 118 | /* Userspace initcalls shouldn't depend on anything in the kernel, so we'll |
@@ -122,7 +122,7 @@ extern struct uml_param __uml_setup_start, __uml_setup_end; | |||
122 | 122 | ||
123 | #define __exitcall(fn) static exitcall_t __exitcall_##fn __exit_call = fn | 123 | #define __exitcall(fn) static exitcall_t __exitcall_##fn __exit_call = fn |
124 | 124 | ||
125 | #define __init_call __attribute_used__ __attribute__ ((__section__ (".initcall.init"))) | 125 | #define __init_call __used __section(.initcall.init) |
126 | 126 | ||
127 | #endif | 127 | #endif |
128 | 128 | ||
diff --git a/drivers/rapidio/rio.h b/drivers/rapidio/rio.h index b242cee656e7..80e3f03b5041 100644 --- a/drivers/rapidio/rio.h +++ b/drivers/rapidio/rio.h | |||
@@ -31,8 +31,8 @@ extern struct rio_route_ops __end_rio_route_ops[]; | |||
31 | 31 | ||
32 | /* Helpers internal to the RIO core code */ | 32 | /* Helpers internal to the RIO core code */ |
33 | #define DECLARE_RIO_ROUTE_SECTION(section, vid, did, add_hook, get_hook) \ | 33 | #define DECLARE_RIO_ROUTE_SECTION(section, vid, did, add_hook, get_hook) \ |
34 | static struct rio_route_ops __rio_route_ops __attribute_used__ \ | 34 | static struct rio_route_ops __rio_route_ops __used \ |
35 | __attribute__((__section__(#section))) = { vid, did, add_hook, get_hook }; | 35 | __section(section)= { vid, did, add_hook, get_hook }; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * DECLARE_RIO_ROUTE_OPS - Registers switch routing operations | 38 | * DECLARE_RIO_ROUTE_OPS - Registers switch routing operations |
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index da8cb3b3592c..ffdc022cae64 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -1376,7 +1376,7 @@ static int do_atm_ioctl(unsigned int fd, unsigned int cmd32, unsigned long arg) | |||
1376 | return -EINVAL; | 1376 | return -EINVAL; |
1377 | } | 1377 | } |
1378 | 1378 | ||
1379 | static __attribute_used__ int | 1379 | static __used int |
1380 | ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) | 1380 | ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) |
1381 | { | 1381 | { |
1382 | return -EINVAL; | 1382 | return -EINVAL; |
diff --git a/include/asm-avr32/setup.h b/include/asm-avr32/setup.h index b0828d43e110..ea3070ff13a5 100644 --- a/include/asm-avr32/setup.h +++ b/include/asm-avr32/setup.h | |||
@@ -110,7 +110,7 @@ struct tagtable { | |||
110 | int (*parse)(struct tag *); | 110 | int (*parse)(struct tag *); |
111 | }; | 111 | }; |
112 | 112 | ||
113 | #define __tag __attribute_used__ __attribute__((__section__(".taglist.init"))) | 113 | #define __tag __used __attribute__((__section__(".taglist.init"))) |
114 | #define __tagtable(tag, fn) \ | 114 | #define __tagtable(tag, fn) \ |
115 | static struct tagtable __tagtable_##fn __tag = { tag, fn } | 115 | static struct tagtable __tagtable_##fn __tag = { tag, fn } |
116 | 116 | ||
diff --git a/include/asm-ia64/gcc_intrin.h b/include/asm-ia64/gcc_intrin.h index e58d3298fa10..5b6665c754c9 100644 --- a/include/asm-ia64/gcc_intrin.h +++ b/include/asm-ia64/gcc_intrin.h | |||
@@ -24,7 +24,7 @@ | |||
24 | extern void ia64_bad_param_for_setreg (void); | 24 | extern void ia64_bad_param_for_setreg (void); |
25 | extern void ia64_bad_param_for_getreg (void); | 25 | extern void ia64_bad_param_for_getreg (void); |
26 | 26 | ||
27 | register unsigned long ia64_r13 asm ("r13") __attribute_used__; | 27 | register unsigned long ia64_r13 asm ("r13") __used; |
28 | 28 | ||
29 | #define ia64_setreg(regnum, val) \ | 29 | #define ia64_setreg(regnum, val) \ |
30 | ({ \ | 30 | ({ \ |
diff --git a/include/asm-sh/machvec.h b/include/asm-sh/machvec.h index ddb18ad23303..b2e4124070ae 100644 --- a/include/asm-sh/machvec.h +++ b/include/asm-sh/machvec.h | |||
@@ -65,6 +65,6 @@ extern struct sh_machine_vector sh_mv; | |||
65 | #define get_system_type() sh_mv.mv_name | 65 | #define get_system_type() sh_mv.mv_name |
66 | 66 | ||
67 | #define __initmv \ | 67 | #define __initmv \ |
68 | __attribute_used__ __attribute__((__section__ (".machvec.init"))) | 68 | __used __section(.machvec.init) |
69 | 69 | ||
70 | #endif /* _ASM_SH_MACHVEC_H */ | 70 | #endif /* _ASM_SH_MACHVEC_H */ |
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h index c6577d3dc46d..c50e5d35fe84 100644 --- a/include/asm-sh/thread_info.h +++ b/include/asm-sh/thread_info.h | |||
@@ -68,7 +68,7 @@ struct thread_info { | |||
68 | #define init_stack (init_thread_union.stack) | 68 | #define init_stack (init_thread_union.stack) |
69 | 69 | ||
70 | /* how to get the current stack pointer from C */ | 70 | /* how to get the current stack pointer from C */ |
71 | register unsigned long current_stack_pointer asm("r15") __attribute_used__; | 71 | register unsigned long current_stack_pointer asm("r15") __used; |
72 | 72 | ||
73 | /* how to get the thread information struct from C */ | 73 | /* how to get the thread information struct from C */ |
74 | static inline struct thread_info *current_thread_info(void) | 74 | static inline struct thread_info *current_thread_info(void) |
diff --git a/include/asm-x86/thread_info_32.h b/include/asm-x86/thread_info_32.h index ef58fd2a6eb0..a516e9192f11 100644 --- a/include/asm-x86/thread_info_32.h +++ b/include/asm-x86/thread_info_32.h | |||
@@ -85,7 +85,7 @@ struct thread_info { | |||
85 | 85 | ||
86 | 86 | ||
87 | /* how to get the current stack pointer from C */ | 87 | /* how to get the current stack pointer from C */ |
88 | register unsigned long current_stack_pointer asm("esp") __attribute_used__; | 88 | register unsigned long current_stack_pointer asm("esp") __used; |
89 | 89 | ||
90 | /* how to get the thread information struct from C */ | 90 | /* how to get the thread information struct from C */ |
91 | static inline struct thread_info *current_thread_info(void) | 91 | static inline struct thread_info *current_thread_info(void) |
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index 2d8c0f48f55e..e5eb795f78a1 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
@@ -7,10 +7,8 @@ | |||
7 | 7 | ||
8 | #if __GNUC_MINOR__ >= 3 | 8 | #if __GNUC_MINOR__ >= 3 |
9 | # define __used __attribute__((__used__)) | 9 | # define __used __attribute__((__used__)) |
10 | # define __attribute_used__ __used /* deprecated */ | ||
11 | #else | 10 | #else |
12 | # define __used __attribute__((__unused__)) | 11 | # define __used __attribute__((__unused__)) |
13 | # define __attribute_used__ __used /* deprecated */ | ||
14 | #endif | 12 | #endif |
15 | 13 | ||
16 | #if __GNUC_MINOR__ >= 4 | 14 | #if __GNUC_MINOR__ >= 4 |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index ee7ca5de970c..0ab3a3232330 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #define __used __attribute__((__used__)) | 17 | #define __used __attribute__((__used__)) |
18 | #define __attribute_used__ __used /* deprecated */ | ||
19 | #define __must_check __attribute__((warn_unused_result)) | 18 | #define __must_check __attribute__((warn_unused_result)) |
20 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 19 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
21 | #define __always_inline inline __attribute__((always_inline)) | 20 | #define __always_inline inline __attribute__((always_inline)) |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index e0114a61268f..d0e17e1657dc 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -126,10 +126,6 @@ extern void __chk_io_ptr(const volatile void __iomem *); | |||
126 | * Mark functions that are referenced only in inline assembly as __used so | 126 | * Mark functions that are referenced only in inline assembly as __used so |
127 | * the code is emitted even though it appears to be unreferenced. | 127 | * the code is emitted even though it appears to be unreferenced. |
128 | */ | 128 | */ |
129 | #ifndef __attribute_used__ | ||
130 | # define __attribute_used__ /* deprecated */ | ||
131 | #endif | ||
132 | |||
133 | #ifndef __used | 129 | #ifndef __used |
134 | # define __used /* unimplemented */ | 130 | # define __used /* unimplemented */ |
135 | #endif | 131 | #endif |
diff --git a/include/linux/elfnote.h b/include/linux/elfnote.h index e831759b2fb5..278e3ef05336 100644 --- a/include/linux/elfnote.h +++ b/include/linux/elfnote.h | |||
@@ -76,7 +76,7 @@ | |||
76 | typeof(desc) _desc \ | 76 | typeof(desc) _desc \ |
77 | __attribute__((aligned(sizeof(Elf##size##_Word)))); \ | 77 | __attribute__((aligned(sizeof(Elf##size##_Word)))); \ |
78 | } _ELFNOTE_PASTE(_note_, unique) \ | 78 | } _ELFNOTE_PASTE(_note_, unique) \ |
79 | __attribute_used__ \ | 79 | __used \ |
80 | __attribute__((section(".note." name), \ | 80 | __attribute__((section(".note." name), \ |
81 | aligned(sizeof(Elf##size##_Word)), \ | 81 | aligned(sizeof(Elf##size##_Word)), \ |
82 | unused)) = { \ | 82 | unused)) = { \ |
diff --git a/include/linux/init.h b/include/linux/init.h index dcb66c76bd48..dde1eaa7766b 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -43,7 +43,7 @@ | |||
43 | #define __init __section(.init.text) __cold | 43 | #define __init __section(.init.text) __cold |
44 | #define __initdata __section(.init.data) | 44 | #define __initdata __section(.init.data) |
45 | #define __exitdata __section(.exit.data) | 45 | #define __exitdata __section(.exit.data) |
46 | #define __exit_call __attribute_used__ __section(.exitcall.exit) | 46 | #define __exit_call __used __section(.exitcall.exit) |
47 | 47 | ||
48 | /* modpost check for section mismatches during the kernel build. | 48 | /* modpost check for section mismatches during the kernel build. |
49 | * A section mismatch happens when there are references from a | 49 | * A section mismatch happens when there are references from a |
@@ -144,7 +144,7 @@ void prepare_namespace(void); | |||
144 | */ | 144 | */ |
145 | 145 | ||
146 | #define __define_initcall(level,fn,id) \ | 146 | #define __define_initcall(level,fn,id) \ |
147 | static initcall_t __initcall_##fn##id __attribute_used__ \ | 147 | static initcall_t __initcall_##fn##id __used \ |
148 | __attribute__((__section__(".initcall" level ".init"))) = fn | 148 | __attribute__((__section__(".initcall" level ".init"))) = fn |
149 | 149 | ||
150 | /* | 150 | /* |
@@ -178,11 +178,11 @@ void prepare_namespace(void); | |||
178 | 178 | ||
179 | #define console_initcall(fn) \ | 179 | #define console_initcall(fn) \ |
180 | static initcall_t __initcall_##fn \ | 180 | static initcall_t __initcall_##fn \ |
181 | __attribute_used__ __section(.con_initcall.init)=fn | 181 | __used __section(.con_initcall.init) = fn |
182 | 182 | ||
183 | #define security_initcall(fn) \ | 183 | #define security_initcall(fn) \ |
184 | static initcall_t __initcall_##fn \ | 184 | static initcall_t __initcall_##fn \ |
185 | __attribute_used__ __section(.security_initcall.init) = fn | 185 | __used __section(.security_initcall.init) = fn |
186 | 186 | ||
187 | struct obs_kernel_param { | 187 | struct obs_kernel_param { |
188 | const char *str; | 188 | const char *str; |
@@ -199,8 +199,7 @@ struct obs_kernel_param { | |||
199 | #define __setup_param(str, unique_id, fn, early) \ | 199 | #define __setup_param(str, unique_id, fn, early) \ |
200 | static char __setup_str_##unique_id[] __initdata __aligned(1) = str; \ | 200 | static char __setup_str_##unique_id[] __initdata __aligned(1) = str; \ |
201 | static struct obs_kernel_param __setup_##unique_id \ | 201 | static struct obs_kernel_param __setup_##unique_id \ |
202 | __attribute_used__ \ | 202 | __used __section(.init.setup) \ |
203 | __section(.init.setup) \ | ||
204 | __attribute__((aligned((sizeof(long))))) \ | 203 | __attribute__((aligned((sizeof(long))))) \ |
205 | = { __setup_str_##unique_id, fn, early } | 204 | = { __setup_str_##unique_id, fn, early } |
206 | 205 | ||
diff --git a/include/linux/module.h b/include/linux/module.h index c97bdb7eb957..404838184ea5 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -178,7 +178,7 @@ void *__symbol_get_gpl(const char *symbol); | |||
178 | #define __CRC_SYMBOL(sym, sec) \ | 178 | #define __CRC_SYMBOL(sym, sec) \ |
179 | extern void *__crc_##sym __attribute__((weak)); \ | 179 | extern void *__crc_##sym __attribute__((weak)); \ |
180 | static const unsigned long __kcrctab_##sym \ | 180 | static const unsigned long __kcrctab_##sym \ |
181 | __attribute_used__ \ | 181 | __used \ |
182 | __attribute__((section("__kcrctab" sec), unused)) \ | 182 | __attribute__((section("__kcrctab" sec), unused)) \ |
183 | = (unsigned long) &__crc_##sym; | 183 | = (unsigned long) &__crc_##sym; |
184 | #else | 184 | #else |
@@ -193,7 +193,7 @@ void *__symbol_get_gpl(const char *symbol); | |||
193 | __attribute__((section("__ksymtab_strings"))) \ | 193 | __attribute__((section("__ksymtab_strings"))) \ |
194 | = MODULE_SYMBOL_PREFIX #sym; \ | 194 | = MODULE_SYMBOL_PREFIX #sym; \ |
195 | static const struct kernel_symbol __ksymtab_##sym \ | 195 | static const struct kernel_symbol __ksymtab_##sym \ |
196 | __attribute_used__ \ | 196 | __used \ |
197 | __attribute__((section("__ksymtab" sec), unused)) \ | 197 | __attribute__((section("__ksymtab" sec), unused)) \ |
198 | = { (unsigned long)&sym, __kstrtab_##sym } | 198 | = { (unsigned long)&sym, __kstrtab_##sym } |
199 | 199 | ||
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 13410b20600f..8126e55c5bdc 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #define __module_cat(a,b) ___module_cat(a,b) | 18 | #define __module_cat(a,b) ___module_cat(a,b) |
19 | #define __MODULE_INFO(tag, name, info) \ | 19 | #define __MODULE_INFO(tag, name, info) \ |
20 | static const char __module_cat(name,__LINE__)[] \ | 20 | static const char __module_cat(name,__LINE__)[] \ |
21 | __attribute_used__ \ | 21 | __used \ |
22 | __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info | 22 | __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info |
23 | #else /* !MODULE */ | 23 | #else /* !MODULE */ |
24 | #define __MODULE_INFO(tag, name, info) | 24 | #define __MODULE_INFO(tag, name, info) |
@@ -72,7 +72,7 @@ struct kparam_array | |||
72 | BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)); \ | 72 | BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)); \ |
73 | static const char __param_str_##name[] = prefix #name; \ | 73 | static const char __param_str_##name[] = prefix #name; \ |
74 | static struct kernel_param const __param_##name \ | 74 | static struct kernel_param const __param_##name \ |
75 | __attribute_used__ \ | 75 | __used \ |
76 | __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \ | 76 | __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \ |
77 | = { __param_str_##name, perm, set, get, { arg } } | 77 | = { __param_str_##name, perm, set, get, { arg } } |
78 | 78 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 0dd93bb62fbe..ae1006322f80 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -867,7 +867,7 @@ enum pci_fixup_pass { | |||
867 | 867 | ||
868 | /* Anonymous variables would be nice... */ | 868 | /* Anonymous variables would be nice... */ |
869 | #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, hook) \ | 869 | #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, hook) \ |
870 | static const struct pci_fixup __pci_fixup_##name __attribute_used__ \ | 870 | static const struct pci_fixup __pci_fixup_##name __used \ |
871 | __attribute__((__section__(#section))) = { vendor, device, hook }; | 871 | __attribute__((__section__(#section))) = { vendor, device, hook }; |
872 | #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \ | 872 | #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \ |
873 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ | 873 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0a80acafd212..e75739ec9c03 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1445,7 +1445,7 @@ static int add_versions(struct buffer *b, struct module *mod) | |||
1445 | 1445 | ||
1446 | buf_printf(b, "\n"); | 1446 | buf_printf(b, "\n"); |
1447 | buf_printf(b, "static const struct modversion_info ____versions[]\n"); | 1447 | buf_printf(b, "static const struct modversion_info ____versions[]\n"); |
1448 | buf_printf(b, "__attribute_used__\n"); | 1448 | buf_printf(b, "__used\n"); |
1449 | buf_printf(b, "__attribute__((section(\"__versions\"))) = {\n"); | 1449 | buf_printf(b, "__attribute__((section(\"__versions\"))) = {\n"); |
1450 | 1450 | ||
1451 | for (s = mod->unres; s; s = s->next) { | 1451 | for (s = mod->unres; s; s = s->next) { |
@@ -1476,7 +1476,7 @@ static void add_depends(struct buffer *b, struct module *mod, | |||
1476 | 1476 | ||
1477 | buf_printf(b, "\n"); | 1477 | buf_printf(b, "\n"); |
1478 | buf_printf(b, "static const char __module_depends[]\n"); | 1478 | buf_printf(b, "static const char __module_depends[]\n"); |
1479 | buf_printf(b, "__attribute_used__\n"); | 1479 | buf_printf(b, "__used\n"); |
1480 | buf_printf(b, "__attribute__((section(\".modinfo\"))) =\n"); | 1480 | buf_printf(b, "__attribute__((section(\".modinfo\"))) =\n"); |
1481 | buf_printf(b, "\"depends="); | 1481 | buf_printf(b, "\"depends="); |
1482 | for (s = mod->unres; s; s = s->next) { | 1482 | for (s = mod->unres; s; s = s->next) { |