3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
6 --- linux-2.4.20/include/asm-arm/setup.h~linux-2.4.24-attribute-used 2001-10-25 16:53:55.000000000 -0400
7 +++ linux-2.4.20/include/asm-arm/setup.h 2005-01-07 03:34:41.753675352 -0500
9 int (*parse)(const struct tag *);
12 -#define __tag __attribute__((unused, __section__(".taglist")))
13 +#define __tag __attribute_used__ __attribute__((__section__(".taglist")))
14 #define __tagtable(tag, fn) \
15 static struct tagtable __tagtable_##fn __tag = { tag, fn }
17 --- linux-2.4.20/include/linux/compiler.h~linux-2.4.24-attribute-used 2001-09-18 17:12:45.000000000 -0400
18 +++ linux-2.4.20/include/linux/compiler.h 2005-01-07 03:34:41.754675200 -0500
20 #define likely(x) __builtin_expect((x),1)
21 #define unlikely(x) __builtin_expect((x),0)
24 +#define __attribute_used__ __attribute__((__used__))
26 +#if __GNUC_MINOR__ >= 3
27 +# define __attribute_used__ __attribute__((__used__))
29 +# define __attribute_used__ __attribute__((__unused__))
30 +#endif /* __GNUC_MINOR__ >= 3 */
32 +#define __attribute_used__ __attribute__((__unused__))
34 +#define __attribute_used__ /* not implemented */
35 +#endif /* __GNUC__ */
37 #endif /* __LINUX_COMPILER_H */
38 --- linux-2.4.20/include/linux/init.h~linux-2.4.24-attribute-used 2001-12-21 12:42:03.000000000 -0500
39 +++ linux-2.4.20/include/linux/init.h 2005-01-07 03:35:29.816368712 -0500
43 #include <linux/config.h>
44 +#include <linux/compiler.h>
46 /* These macros are used to mark some functions or
47 * initialized data (doesn't apply to uninitialized data)
49 extern initcall_t __initcall_start, __initcall_end;
51 #define __initcall(fn) \
52 - static initcall_t __initcall_##fn __init_call = fn
53 + static initcall_t __initcall_##fn __attribute_used__ __init_call = fn
54 #define __exitcall(fn) \
55 static exitcall_t __exitcall_##fn __exit_call = fn
59 #define __setup(str, fn) \
60 static char __setup_str_##fn[] __initdata = str; \
61 - static struct kernel_param __setup_##fn __attribute__((unused)) __initsetup = { __setup_str_##fn, fn }
62 + static struct kernel_param __setup_##fn __attribute_used__ __initsetup = { __setup_str_##fn, fn }
64 #endif /* __ASSEMBLY__ */
69 #define __init __attribute__ ((__section__ (".text.init")))
70 -#define __exit __attribute__ ((unused, __section__(".text.exit")))
71 +#define __exit __attribute_used__ __attribute__ ((__section__(".text.exit")))
72 #define __initdata __attribute__ ((__section__ (".data.init")))
73 -#define __exitdata __attribute__ ((unused, __section__ (".data.exit")))
74 -#define __initsetup __attribute__ ((unused,__section__ (".setup.init")))
75 -#define __init_call __attribute__ ((unused,__section__ (".initcall.init")))
76 -#define __exit_call __attribute__ ((unused,__section__ (".exitcall.exit")))
77 +#define __exitdata __attribute_used__ __attribute__ ((__section__ (".data.exit")))
78 +#define __initsetup __attribute_used__ __attribute__ ((__section__ (".setup.init")))
79 +#define __init_call __attribute_used__ __attribute__ ((__section__ (".initcall.init")))
80 +#define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
82 /* For assembly routines */
83 #define __INIT .section ".text.init","ax"
84 --- linux-2.4.20/include/linux/module.h~linux-2.4.24-attribute-used 2002-08-02 20:39:45.000000000 -0400
85 +++ linux-2.4.20/include/linux/module.h 2005-01-07 03:34:41.755675048 -0500
87 #define _LINUX_MODULE_H
89 #include <linux/config.h>
90 +#include <linux/compiler.h>
91 #include <linux/spinlock.h>
92 #include <linux/list.h>
96 #define MODULE_GENERIC_TABLE(gtype,name) \
97 static const unsigned long __module_##gtype##_size \
98 - __attribute__ ((unused)) = sizeof(struct gtype##_id); \
99 + __attribute_used__ = sizeof(struct gtype##_id); \
100 static const struct gtype##_id * __module_##gtype##_table \
101 - __attribute__ ((unused)) = name
102 + __attribute_used__ = name
105 * The following license idents are currently accepted as indicating free
109 #define MODULE_LICENSE(license) \
110 -static const char __module_license[] __attribute__((section(".modinfo"))) = \
111 +static const char __module_license[] __attribute_used__ __attribute__((section(".modinfo"))) = \
114 /* Define the module variable, and usage macros. */
115 @@ -296,10 +297,10 @@
116 #define MOD_IN_USE __MOD_IN_USE(THIS_MODULE)
118 #include <linux/version.h>
119 -static const char __module_kernel_version[] __attribute__((section(".modinfo"))) =
120 +static const char __module_kernel_version[] __attribute_used__ __attribute__((section(".modinfo"))) =
121 "kernel_version=" UTS_RELEASE;
123 -static const char __module_using_checksums[] __attribute__((section(".modinfo"))) =
124 +static const char __module_using_checksums[] __attribute_used__ __attribute__((section(".modinfo"))) =
130 #define MODULE_GENERIC_TABLE(gtype,name) \
131 static const struct gtype##_id * __module_##gtype##_table \
132 - __attribute__ ((unused, __section__(".data.exit"))) = name
133 + __attribute_used__ __attribute__ ((__section__(".data.exit"))) = name