linux-mips
[Top] [All Lists]

[PATCH] mips/ftrace: Fix kernel compile error

To: LKML <linux-kernel@vger.kernel.org>, linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH] mips/ftrace: Fix kernel compile error
From: Steven Rostedt <rostedt@goodmis.org>
Date: Fri, 25 Jan 2013 13:04:16 -0500
Cc: Al Cooper <alcooperx@gmail.com>, David Daney <ddaney.cavm@gmail.com>, Ralf Baechle <ralf@linux-mips.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Sender: linux-mips-bounce@linux-mips.org
While compiling for my yeeloong2 laptop, I hit this compile error.

As warnings are set for errors, if we define ftrace_modify_code_2(), we
must use it. As MIPS 64 does not use this function, it requires being
commented out via an #ifndef CONFIG_64bit. Otherwise you get this error:

  CC      arch/mips/kernel/ftrace.o
cc1: warnings being treated as errors
/work/autotest/nobackup/mips-test.git/arch/mips/kernel/ftrace.c:98:12:
error: 'ftrace_modify_code_2' defined but not used
make[3]: *** [arch/mips/kernel/ftrace.o] Error 1
make[2]: *** [arch/mips/kernel] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [arch/mips] Error 2
make[1]: *** Waiting for unfinished jobs....


Cc: Al Cooper <alcooperx@gmail.com>
Cc: David Daney <ddaney.cvm@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c
index 6bcb678..83fa146 100644
--- a/arch/mips/kernel/ftrace.c
+++ b/arch/mips/kernel/ftrace.c
@@ -95,6 +95,7 @@ static int ftrace_modify_code(unsigned long ip, unsigned int 
new_code)
        return 0;
 }
 
+#ifndef CONFIG_64BIT
 static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1,
                                unsigned int new_code2)
 {
@@ -110,6 +111,7 @@ static int ftrace_modify_code_2(unsigned long ip, unsigned 
int new_code1,
        flush_icache_range(ip, ip + 8); /* original ip + 12 */
        return 0;
 }
+#endif
 
 /*
  * The details about the calling site of mcount on MIPS



<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] mips/ftrace: Fix kernel compile error, Steven Rostedt <=