Commit e52dd9fc authored by Wu Zhangjin's avatar Wu Zhangjin Committed by Ralf Baechle

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: default avatarWu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/874/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent aae7e8da
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
* please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. othewise, you * please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. othewise, you
* need to implement your own putc(). * need to implement your own putc().
*/ */
#include <linux/compiler.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/types.h> #include <linux/types.h>
void __attribute__ ((weak)) putc(char c) void __weak putc(char c)
{ {
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
* Copyright (C) 2004, 2005 Ralf Baechle * Copyright (C) 2004, 2005 Ralf Baechle
* Copyright (C) 2005 MIPS Technologies, Inc. * Copyright (C) 2005 MIPS Technologies, Inc.
*/ */
#include <linux/compiler.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/oprofile.h> #include <linux/oprofile.h>
...@@ -14,9 +15,9 @@ ...@@ -14,9 +15,9 @@
#include "op_impl.h" #include "op_impl.h"
extern struct op_mips_model op_model_mipsxx_ops __attribute__((weak)); extern struct op_mips_model op_model_mipsxx_ops __weak;
extern struct op_mips_model op_model_rm9000_ops __attribute__((weak)); extern struct op_mips_model op_model_rm9000_ops __weak;
extern struct op_mips_model op_model_loongson2_ops __attribute__((weak)); extern struct op_mips_model op_model_loongson2_ops __weak;
static struct op_mips_model *model; static struct op_mips_model *model;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment