[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220815012300.hiz5pd3nynrehkhm@box.shutemov.name>
Date: Mon, 15 Aug 2022 04:23:00 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
Song Liu <song@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Steven Rostedt <rostedt@...dmis.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Linux 6.0-rc1
53cd885bc5c3 ("ftrace: Allow IPMODIFY and DIRECT ops on the same
function") breaks build for me (CONFIG_MODULE=n):
CC kernel/trace/ftrace.o
kernel/trace/ftrace.c:3149:1: error: ‘ops_references_rec’ defined but not used [-Werror=unused-function]
3149 | ops_references_rec(struct ftrace_ops *ops, struct dyn_ftrace *rec)
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
The fix I used locally:
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index bc921a3f7ea8..90fa3ceeaeeb 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3138,19 +3138,6 @@ ops_references_ip(struct ftrace_ops *ops, unsigned long ip)
return true;
}
-/*
- * Check if the current ops references the record.
- *
- * If the ops traces all functions, then it was already accounted for.
- * If the ops does not trace the current record function, skip it.
- * If the ops ignores the function via notrace filter, skip it.
- */
-static bool
-ops_references_rec(struct ftrace_ops *ops, struct dyn_ftrace *rec)
-{
- return ops_references_ip(ops, rec->ip);
-}
-
static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs)
{
bool init_nop = ftrace_need_init_nop();
@@ -6818,6 +6805,19 @@ static int ftrace_get_trampoline_kallsym(unsigned int symnum,
static LIST_HEAD(ftrace_mod_maps);
+/*
+ * Check if the current ops references the record.
+ *
+ * If the ops traces all functions, then it was already accounted for.
+ * If the ops does not trace the current record function, skip it.
+ * If the ops ignores the function via notrace filter, skip it.
+ */
+static bool
+ops_references_rec(struct ftrace_ops *ops, struct dyn_ftrace *rec)
+{
+ return ops_references_ip(ops, rec->ip);
+}
+
static int referenced_filters(struct dyn_ftrace *rec)
{
struct ftrace_ops *ops;
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists