From: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Menglong Dong <menglong8.dong@gmail.com>,
Menglong Dong <dongml2@chinatelecom.cn>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: [PATCH 1/2] tracing: fprobe: Remove unused local variable
Date: Wed, 24 Sep 2025 09:26:29 +0900 [thread overview]
Message-ID: <175867358989.600222.6175459620045800878.stgit@devnote2> (raw)
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
The 'ret' local variable in fprobe_remove_node_in_module() was used
for checking the error state in the loop, but commit dfe0d675df82
("tracing: fprobe: use rhltable for fprobe_ip_table") removed the loop.
So we don't need it anymore.
Fixes: dfe0d675df82 ("tracing: fprobe: use rhltable for fprobe_ip_table")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
---
kernel/trace/fprobe.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c
index 6a205903b1ed..12ec194fdfed 100644
--- a/kernel/trace/fprobe.c
+++ b/kernel/trace/fprobe.c
@@ -457,8 +457,6 @@ static int fprobe_addr_list_add(struct fprobe_addr_list *alist, unsigned long ad
static void fprobe_remove_node_in_module(struct module *mod, struct fprobe_hlist_node *node,
struct fprobe_addr_list *alist)
{
- int ret = 0;
-
if (!within_module(node->addr, mod))
return;
if (delete_fprobe_node(node))
@@ -467,8 +465,7 @@ static void fprobe_remove_node_in_module(struct module *mod, struct fprobe_hlist
* If failed to update alist, just continue to update hlist.
* Therefore, at list user handler will not hit anymore.
*/
- if (!ret)
- ret = fprobe_addr_list_add(alist, node->addr);
+ fprobe_addr_list_add(alist, node->addr);
}
/* Handle module unloading to manage fprobe_ip_table. */
next reply other threads:[~2025-09-24 0:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 0:26 Masami Hiramatsu (Google) [this message]
2025-09-24 0:26 ` [PATCH 2/2] tracing: fprobe: Fix to remove recorded module addresses from filter Masami Hiramatsu (Google)
2025-09-24 1:55 ` menglong.dong
2025-09-24 3:49 ` menglong.dong
2025-09-24 8:10 ` Masami Hiramatsu
2025-09-24 1:22 ` [PATCH 1/2] tracing: fprobe: Remove unused local variable menglong.dong
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=175867358989.600222.6175459620045800878.stgit@devnote2 \
--to=mhiramat@kernel.org \
--cc=dongml2@chinatelecom.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=menglong8.dong@gmail.com \
--cc=rostedt@goodmis.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).