aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-01-24 16:16:20 -0500
committerSam Ravnborg <sam@ravnborg.org>2008-01-28 17:21:18 -0500
commit3ff6eecca4e5c49a5d1dd8b58ea0e20102ce08f0 (patch)
tree9af53a5ce0054520be6d572f988a76f3ab4ef0c0 /include/linux
parentbc395add945659e04cc7cf250755ba0edc1a9fdc (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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/compiler-gcc3.h2
-rw-r--r--include/linux/compiler-gcc4.h1
-rw-r--r--include/linux/compiler.h4
-rw-r--r--include/linux/elfnote.h2
-rw-r--r--include/linux/init.h11
-rw-r--r--include/linux/module.h4
-rw-r--r--include/linux/moduleparam.h4
-rw-r--r--include/linux/pci.h2
8 files changed, 11 insertions, 19 deletions
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
187struct obs_kernel_param { 187struct 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) \
20static const char __module_cat(name,__LINE__)[] \ 20static 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, \