diff options
author | Wu Zhangjin <wuzhangjin@gmail.com> | 2010-01-26 23:02:34 +0800 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 12:53:17 +0100 |
commit | e52dd9fc6b9e0c17b220bd38371ff15032a1a155 (patch) | |
tree | 01f4dba99ecfb3001d01ae8ec6ff6731ac55a51e /arch/mips | |
parent | aae7e8da806e1536fdee0632a40aaaeed97a2f1b (diff) | |
download | linux-e52dd9fc6b9e0c17b220bd38371ff15032a1a155.tar.bz2 |
MIPS: Simplify the weak annotation with __weak
Found by
$ find arch/mips/ -name "*.c" | xargs -i grep -H weak {} | grep -v __weak
[Ralf: Made this bulletproof by including <linux/compiler.h>]
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/874/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/boot/compressed/dbg.c | 4 | ||||
-rw-r--r-- | arch/mips/oprofile/common.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/arch/mips/boot/compressed/dbg.c b/arch/mips/boot/compressed/dbg.c index ff4dc7a33a9f..134a6162e394 100644 --- a/arch/mips/boot/compressed/dbg.c +++ b/arch/mips/boot/compressed/dbg.c @@ -5,11 +5,11 @@ * please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. othewise, you * need to implement your own putc(). */ - +#include <linux/compiler.h> #include <linux/init.h> #include <linux/types.h> -void __attribute__ ((weak)) putc(char c) +void __weak putc(char c) { } diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index 7832ad257a14..f9eb1aba6345 100644 --- a/arch/mips/oprofile/common.c +++ b/arch/mips/oprofile/common.c @@ -6,6 +6,7 @@ * Copyright (C) 2004, 2005 Ralf Baechle * Copyright (C) 2005 MIPS Technologies, Inc. */ +#include <linux/compiler.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/oprofile.h> @@ -14,9 +15,9 @@ #include "op_impl.h" -extern struct op_mips_model op_model_mipsxx_ops __attribute__((weak)); -extern struct op_mips_model op_model_rm9000_ops __attribute__((weak)); -extern struct op_mips_model op_model_loongson2_ops __attribute__((weak)); +extern struct op_mips_model op_model_mipsxx_ops __weak; +extern struct op_mips_model op_model_rm9000_ops __weak; +extern struct op_mips_model op_model_loongson2_ops __weak; static struct op_mips_model *model; |