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 <alcoop...@gmail.com>
Cc: David Daney <ddaney....@gmail.com>
Signed-off-by: Steven Rostedt <rost...@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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to