From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
Abaci Robot <abaci@linux.alibaba.com>,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Subject: [for-next][PATCH 1/3] function_graph: Remove the unused variable func
Date: Mon, 24 Mar 2025 17:18:22 -0400 [thread overview]
Message-ID: <20250324211837.171611564@goodmis.org> (raw)
In-Reply-To: 20250324211821.731702961@goodmis.org
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Variable func is not effectively used, so delete it.
kernel/trace/trace_functions_graph.c:925:16: warning: variable ‘func’ set but not used.
This happened because the variable "func" which came from "call->func" was
replaced by "ret_func" coming from "graph_ret->func" but "func" wasn't
removed after the replacement.
Link: https://lore.kernel.org/20250307021412.119107-1-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=19250
Fixes: ff5c9c576e754 ("ftrace: Add support for function argument to graph tracer")
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
kernel/trace/trace_functions_graph.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 71b2fb068b6b..ed61ff719aa4 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -922,7 +922,6 @@ print_graph_entry_leaf(struct trace_iterator *iter,
struct ftrace_graph_ent *call;
unsigned long long duration;
unsigned long ret_func;
- unsigned long func;
int args_size;
int cpu = iter->cpu;
int i;
@@ -933,8 +932,6 @@ print_graph_entry_leaf(struct trace_iterator *iter,
call = &entry->graph_ent;
duration = ret_entry->rettime - ret_entry->calltime;
- func = call->func + iter->tr->text_delta;
-
if (data) {
struct fgraph_cpu_data *cpu_data;
--
2.47.2
next prev parent reply other threads:[~2025-03-24 21:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-24 21:18 [for-next][PATCH 0/3] ftrace: Updates for v6.15 Steven Rostedt
2025-03-24 21:18 ` Steven Rostedt [this message]
2025-03-24 21:18 ` [for-next][PATCH 2/3] tracing: Fix use-after-free in print_graph_function_flags during tracer switching Steven Rostedt
2025-03-24 21:18 ` [for-next][PATCH 3/3] tracing: Use hashtable.h for event_hash Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250324211837.171611564@goodmis.org \
--to=rostedt@goodmis.org \
--cc=abaci@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).