[<prev] [next>] [day] [month] [year] [list]
Message-ID: <51F0A152.4010907@cn.fujitsu.com>
Date: Thu, 25 Jul 2013 11:53:54 +0800
From: Lai Jiangshan <laijs@...fujitsu.com>
To: Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] tracing: remove the found node directly before break the
search-loop
Just a clean-up, but it gives us better readability.
Sign-off-by: Lai Jiangshan <laijs@...fujitsu.com>
---
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 7d85429..a44f501 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1827,13 +1827,13 @@ static void trace_module_remove_events(struct module *mod)
/* Now free the file_operations */
list_for_each_entry(file_ops, &ftrace_module_file_list, list) {
- if (file_ops->mod == mod)
+ if (file_ops->mod == mod) {
+ list_del(&file_ops->list);
+ kfree(file_ops);
break;
+ }
}
- if (&file_ops->list != &ftrace_module_file_list) {
- list_del(&file_ops->list);
- kfree(file_ops);
- }
+
up_write(&trace_event_sem);
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists