]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
remove __attribute_used__
authorAdrian Bunk <bunk@kernel.org>
Thu, 24 Jan 2008 21:16:20 +0000 (22:16 +0100)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 28 Jan 2008 22:21:18 +0000 (23:21 +0100)
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>
22 files changed:
arch/alpha/lib/dec_and_lock.c
arch/powerpc/boot/Makefile
arch/powerpc/kernel/sysfs.c
arch/powerpc/oprofile/op_model_power4.c
arch/sparc64/kernel/unaligned.c
arch/um/include/init.h
drivers/rapidio/rio.h
fs/compat_ioctl.c
include/asm-avr32/setup.h
include/asm-ia64/gcc_intrin.h
include/asm-sh/machvec.h
include/asm-sh/thread_info.h
include/asm-x86/thread_info_32.h
include/linux/compiler-gcc3.h
include/linux/compiler-gcc4.h
include/linux/compiler.h
include/linux/elfnote.h
include/linux/init.h
include/linux/module.h
include/linux/moduleparam.h
include/linux/pci.h
scripts/mod/modpost.c

index 6ae2500a9d9e8dec21fd4fb05302ef1c6dae11ca..0f5520d2f45fc41d72d2d333fb291c50517bfa3c 100644 (file)
@@ -30,8 +30,7 @@ _atomic_dec_and_lock:                         \n\
        .previous                               \n\
        .end _atomic_dec_and_lock");
 
-static int __attribute_used__
-atomic_dec_and_lock_1(atomic_t *atomic, spinlock_t *lock)
+static int __used atomic_dec_and_lock_1(atomic_t *atomic, spinlock_t *lock)
 {
        /* Slow path */
        spin_lock(lock);
index 18e32719d0ed4544202bae47cc9c1361e6116649..4b1d98b8135ef5db6da95654bf4f430e4704e4f3 100644 (file)
@@ -65,7 +65,7 @@ obj-wlib := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-wlib))))
 obj-plat := $(addsuffix .o, $(basename $(addprefix $(obj)/, $(src-plat))))
 
 quiet_cmd_copy_zlib = COPY    $@
-      cmd_copy_zlib = sed "s@__attribute_used__@@;s@<linux/\([^>]*\).*@\"\1\"@" $< > $@
+      cmd_copy_zlib = sed "s@__used@@;s@<linux/\([^>]*\).*@\"\1\"@" $< > $@
 
 quiet_cmd_copy_zlibheader = COPY    $@
       cmd_copy_zlibheader = sed "s@<linux/\([^>]*\).*@\"\1\"@" $< > $@
index 25d9a96484ddeb914ff0d7fe63aa1b0c3baf7e8e..c8127f832df0f6d28d8efb0ee3a2097f8933dcce 100644 (file)
@@ -158,7 +158,7 @@ static ssize_t show_##NAME(struct sys_device *dev, char *buf) \
        unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \
        return sprintf(buf, "%lx\n", val); \
 } \
-static ssize_t __attribute_used__ \
+static ssize_t __used \
        store_##NAME(struct sys_device *dev, const char *buf, size_t count) \
 { \
        struct cpu *cpu = container_of(dev, struct cpu, sysdev); \
index cddc250a6a5cf13325556175cbbed3473c61ec02..446a8bbb847b0f2dcd679ac74eaece531cee4476 100644 (file)
@@ -172,15 +172,15 @@ static void power4_stop(void)
 }
 
 /* Fake functions used by canonicalize_pc */
-static void __attribute_used__ hypervisor_bucket(void)
+static void __used hypervisor_bucket(void)
 {
 }
 
-static void __attribute_used__ rtas_bucket(void)
+static void __used rtas_bucket(void)
 {
 }
 
-static void __attribute_used__ kernel_unknown_bucket(void)
+static void __used kernel_unknown_bucket(void)
 {
 }
 
index 953be816fa2564b6692a7f3a25d884337958f017..dc7bf1b6321ceb89fbe658cce07f08f7df513808 100644 (file)
@@ -175,7 +175,7 @@ unsigned long compute_effective_address(struct pt_regs *regs,
 }
 
 /* This is just to make gcc think die_if_kernel does return... */
-static void __attribute_used__ unaligned_panic(char *str, struct pt_regs *regs)
+static void __used unaligned_panic(char *str, struct pt_regs *regs)
 {
        die_if_kernel(str, regs);
 }
index d4de7c0120ced888209122f47424d9754c1ed50f..cebc6cae91903442235e8f4b4e782b71a5feb5c9 100644 (file)
@@ -42,15 +42,15 @@ typedef void (*exitcall_t)(void);
 
 /* These are for everybody (although not all archs will actually
    discard it in modules) */
-#define __init         __attribute__ ((__section__ (".init.text")))
-#define __initdata     __attribute__ ((__section__ (".init.data")))
-#define __exitdata     __attribute__ ((__section__(".exit.data")))
-#define __exit_call    __attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
+#define __init         __section(.init.text)
+#define __initdata     __section(.init.data)
+#define __exitdata     __section(.exit.data)
+#define __exit_call    __used __section(.exitcall.exit)
 
 #ifdef MODULE
-#define __exit         __attribute__ ((__section__(".exit.text")))
+#define __exit         __section(.exit.text)
 #else
-#define __exit         __attribute_used__ __attribute__ ((__section__(".exit.text")))
+#define __exit         __used __section(.exit.text)
 #endif
 
 #endif
@@ -103,16 +103,16 @@ extern struct uml_param __uml_setup_start, __uml_setup_end;
  * Mark functions and data as being only used at initialization
  * or exit time.
  */
-#define __uml_init_setup       __attribute_used__ __attribute__ ((__section__ (".uml.setup.init")))
-#define __uml_setup_help       __attribute_used__ __attribute__ ((__section__ (".uml.help.init")))
-#define __uml_init_call                __attribute_used__ __attribute__ ((__section__ (".uml.initcall.init")))
-#define __uml_postsetup_call   __attribute_used__ __attribute__ ((__section__ (".uml.postsetup.init")))
-#define __uml_exit_call                __attribute_used__ __attribute__ ((__section__ (".uml.exitcall.exit")))
+#define __uml_init_setup       __used __section(.uml.setup.init)
+#define __uml_setup_help       __used __section(.uml.help.init)
+#define __uml_init_call                __used __section(.uml.initcall.init)
+#define __uml_postsetup_call   __used __section(.uml.postsetup.init)
+#define __uml_exit_call                __used __section(.uml.exitcall.exit)
 
 #ifndef __KERNEL__
 
 #define __define_initcall(level,fn) \
-       static initcall_t __initcall_##fn __attribute_used__ \
+       static initcall_t __initcall_##fn __used \
        __attribute__((__section__(".initcall" level ".init"))) = fn
 
 /* 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;
 
 #define __exitcall(fn) static exitcall_t __exitcall_##fn __exit_call = fn
 
-#define __init_call    __attribute_used__ __attribute__ ((__section__ (".initcall.init")))
+#define __init_call    __used __section(.initcall.init)
 
 #endif
 
index b242cee656e77e5bf1a57069e15db0517b389ee2..80e3f03b5041e0348f766b14caca2fa601efa82f 100644 (file)
@@ -31,8 +31,8 @@ extern struct rio_route_ops __end_rio_route_ops[];
 
 /* Helpers internal to the RIO core code */
 #define DECLARE_RIO_ROUTE_SECTION(section, vid, did, add_hook, get_hook)  \
-        static struct rio_route_ops __rio_route_ops __attribute_used__   \
-               __attribute__((__section__(#section))) = { vid, did, add_hook, get_hook };
+       static struct rio_route_ops __rio_route_ops __used   \
+       __section(section)= { vid, did, add_hook, get_hook };
 
 /**
  * DECLARE_RIO_ROUTE_OPS - Registers switch routing operations
index da8cb3b3592c96ade1614ab8e553b5e16597b42a..ffdc022cae64adb62b5108d259f08fa3057b1423 100644 (file)
@@ -1376,7 +1376,7 @@ static int do_atm_ioctl(unsigned int fd, unsigned int cmd32, unsigned long arg)
         return -EINVAL;
 }
 
-static __attribute_used__ int 
+static __used int
 ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
        return -EINVAL;
index b0828d43e110c93f27b65adf593fc0c40e58a676..ea3070ff13a528872b55915195c707ae1079f764 100644 (file)
@@ -110,7 +110,7 @@ struct tagtable {
        int     (*parse)(struct tag *);
 };
 
-#define __tag __attribute_used__ __attribute__((__section__(".taglist.init")))
+#define __tag __used __attribute__((__section__(".taglist.init")))
 #define __tagtable(tag, fn)                                            \
        static struct tagtable __tagtable_##fn __tag = { tag, fn }
 
index e58d3298fa109eb4ba733d580e39d3b06580dbcc..5b6665c754c914213f4e6fa8fb76bc497e5bbf1c 100644 (file)
@@ -24,7 +24,7 @@
 extern void ia64_bad_param_for_setreg (void);
 extern void ia64_bad_param_for_getreg (void);
 
-register unsigned long ia64_r13 asm ("r13") __attribute_used__;
+register unsigned long ia64_r13 asm ("r13") __used;
 
 #define ia64_setreg(regnum, val)                                               \
 ({                                                                             \
index ddb18ad23303ae8a4f26dafdf38da0e3dd83c8fc..b2e4124070aef289a724a90049bba93adfcffa64 100644 (file)
@@ -65,6 +65,6 @@ extern struct sh_machine_vector sh_mv;
 #define get_system_type()      sh_mv.mv_name
 
 #define __initmv \
-       __attribute_used__ __attribute__((__section__ (".machvec.init")))
+       __used __section(.machvec.init)
 
 #endif /* _ASM_SH_MACHVEC_H */
index c6577d3dc46d594e33bc4a572f71d44bb02a88f2..c50e5d35fe84fefe26978011966a5d39f3d2ac7b 100644 (file)
@@ -68,7 +68,7 @@ struct thread_info {
 #define init_stack             (init_thread_union.stack)
 
 /* how to get the current stack pointer from C */
-register unsigned long current_stack_pointer asm("r15") __attribute_used__;
+register unsigned long current_stack_pointer asm("r15") __used;
 
 /* how to get the thread information struct from C */
 static inline struct thread_info *current_thread_info(void)
index ef58fd2a6eb089f49086f1dfec56d451af127f8b..a516e9192f1135a2a6b310caf5aaf0525df43220 100644 (file)
@@ -85,7 +85,7 @@ struct thread_info {
 
 
 /* how to get the current stack pointer from C */
-register unsigned long current_stack_pointer asm("esp") __attribute_used__;
+register unsigned long current_stack_pointer asm("esp") __used;
 
 /* how to get the thread information struct from C */
 static inline struct thread_info *current_thread_info(void)
index 2d8c0f48f55e6236a4c25b8510feafb48670ff10..e5eb795f78a1c9b22f2c9c474b80c32a0cfff810 100644 (file)
@@ -7,10 +7,8 @@
 
 #if __GNUC_MINOR__ >= 3
 # define __used                        __attribute__((__used__))
-# define __attribute_used__    __used                          /* deprecated */
 #else
 # define __used                        __attribute__((__unused__))
-# define __attribute_used__    __used                          /* deprecated */
 #endif
 
 #if __GNUC_MINOR__ >= 4
index ee7ca5de970cb6cfadd4c04f5df4444ed07645a8..0ab3a32323307d1445392ea571550698c0cd70d1 100644 (file)
@@ -15,7 +15,6 @@
 #endif
 
 #define __used                 __attribute__((__used__))
-#define __attribute_used__     __used                  /* deprecated */
 #define __must_check           __attribute__((warn_unused_result))
 #define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
 #define __always_inline                inline __attribute__((always_inline))
index e0114a61268ffedd91e5d9fb23fcbd7b41b56382..d0e17e1657dca11b86f151084a10bc87204c80a1 100644 (file)
@@ -126,10 +126,6 @@ extern void __chk_io_ptr(const volatile void __iomem *);
  * Mark functions that are referenced only in inline assembly as __used so
  * the code is emitted even though it appears to be unreferenced.
  */
-#ifndef __attribute_used__
-# define __attribute_used__    /* deprecated */
-#endif
-
 #ifndef __used
 # define __used                        /* unimplemented */
 #endif
index e831759b2fb5f971cfabdb94dfa9863b4f57cc4b..278e3ef0533699f2e9a3845bdc12715ce6be30cb 100644 (file)
@@ -76,7 +76,7 @@
                typeof(desc) _desc                                      \
                             __attribute__((aligned(sizeof(Elf##size##_Word)))); \
        } _ELFNOTE_PASTE(_note_, unique)                                \
-               __attribute_used__                                      \
+               __used                                                  \
                __attribute__((section(".note." name),                  \
                               aligned(sizeof(Elf##size##_Word)),       \
                               unused)) = {                             \
index dcb66c76bd48dde344ae136141929d4fc410df9f..dde1eaa7766bfab13da57f4c64f4211242831be9 100644 (file)
@@ -43,7 +43,7 @@
 #define __init         __section(.init.text) __cold
 #define __initdata     __section(.init.data)
 #define __exitdata     __section(.exit.data)
-#define __exit_call    __attribute_used__ __section(.exitcall.exit)
+#define __exit_call    __used __section(.exitcall.exit)
 
 /* modpost check for section mismatches during the kernel build.
  * A section mismatch happens when there are references from a
@@ -144,7 +144,7 @@ void prepare_namespace(void);
  */
 
 #define __define_initcall(level,fn,id) \
-       static initcall_t __initcall_##fn##id __attribute_used__ \
+       static initcall_t __initcall_##fn##id __used \
        __attribute__((__section__(".initcall" level ".init"))) = fn
 
 /*
@@ -178,11 +178,11 @@ void prepare_namespace(void);
 
 #define console_initcall(fn) \
        static initcall_t __initcall_##fn \
-       __attribute_used__ __section(.con_initcall.init)=fn
+       __used __section(.con_initcall.init) = fn
 
 #define security_initcall(fn) \
        static initcall_t __initcall_##fn \
-       __attribute_used__ __section(.security_initcall.init) = fn
+       __used __section(.security_initcall.init) = fn
 
 struct obs_kernel_param {
        const char *str;
@@ -199,8 +199,7 @@ struct obs_kernel_param {
 #define __setup_param(str, unique_id, fn, early)                       \
        static char __setup_str_##unique_id[] __initdata __aligned(1) = str; \
        static struct obs_kernel_param __setup_##unique_id      \
-               __attribute_used__                              \
-               __section(.init.setup)                          \
+               __used __section(.init.setup)                   \
                __attribute__((aligned((sizeof(long)))))        \
                = { __setup_str_##unique_id, fn, early }
 
index c97bdb7eb957cdd71e625ac9cf66862132d153da..404838184ea512d35c0b66909106db05f6b69bfe 100644 (file)
@@ -178,7 +178,7 @@ void *__symbol_get_gpl(const char *symbol);
 #define __CRC_SYMBOL(sym, sec)                                 \
        extern void *__crc_##sym __attribute__((weak));         \
        static const unsigned long __kcrctab_##sym              \
-       __attribute_used__                                      \
+       __used                                                  \
        __attribute__((section("__kcrctab" sec), unused))       \
        = (unsigned long) &__crc_##sym;
 #else
@@ -193,7 +193,7 @@ void *__symbol_get_gpl(const char *symbol);
        __attribute__((section("__ksymtab_strings")))           \
        = MODULE_SYMBOL_PREFIX #sym;                            \
        static const struct kernel_symbol __ksymtab_##sym       \
-       __attribute_used__                                      \
+       __used                                                  \
        __attribute__((section("__ksymtab" sec), unused))       \
        = { (unsigned long)&sym, __kstrtab_##sym }
 
index 13410b20600f4a33284da6252cc7beeb99c9f105..8126e55c5bdcbd3c68d4c6ffc4c83797e3b1ca7c 100644 (file)
@@ -18,7 +18,7 @@
 #define __module_cat(a,b) ___module_cat(a,b)
 #define __MODULE_INFO(tag, name, info)                                   \
 static const char __module_cat(name,__LINE__)[]                                  \
-  __attribute_used__                                                     \
+  __used                                                                 \
   __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
 #else  /* !MODULE */
 #define __MODULE_INFO(tag, name, info)
@@ -72,7 +72,7 @@ struct kparam_array
        BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)); \
        static const char __param_str_##name[] = prefix #name;          \
        static struct kernel_param const __param_##name                 \
-       __attribute_used__                                              \
+       __used                                                          \
     __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
        = { __param_str_##name, perm, set, get, { arg } }
 
index 0dd93bb62fbe9f4af33c458f24db96ca79d8c0c2..ae1006322f808d90b233188108efac1f59f23359 100644 (file)
@@ -867,7 +867,7 @@ enum pci_fixup_pass {
 
 /* Anonymous variables would be nice... */
 #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, hook) \
-       static const struct pci_fixup __pci_fixup_##name __attribute_used__ \
+       static const struct pci_fixup __pci_fixup_##name __used         \
        __attribute__((__section__(#section))) = { vendor, device, hook };
 #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook)                  \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early,                     \
index 0a80acafd2123ce3aba70e343a284dba23c7f04f..e75739ec9c034ca4d903fa9199476bb0c1a44f2c 100644 (file)
@@ -1445,7 +1445,7 @@ static int add_versions(struct buffer *b, struct module *mod)
 
        buf_printf(b, "\n");
        buf_printf(b, "static const struct modversion_info ____versions[]\n");
-       buf_printf(b, "__attribute_used__\n");
+       buf_printf(b, "__used\n");
        buf_printf(b, "__attribute__((section(\"__versions\"))) = {\n");
 
        for (s = mod->unres; s; s = s->next) {
@@ -1476,7 +1476,7 @@ static void add_depends(struct buffer *b, struct module *mod,
 
        buf_printf(b, "\n");
        buf_printf(b, "static const char __module_depends[]\n");
-       buf_printf(b, "__attribute_used__\n");
+       buf_printf(b, "__used\n");
        buf_printf(b, "__attribute__((section(\".modinfo\"))) =\n");
        buf_printf(b, "\"depends=");
        for (s = mod->unres; s; s = s->next) {