From: Masami Hiramatsu (Google) <mhira...@kernel.org>

Remove unnecessary active check because tr->flags already checks it.

Signed-off-by: Masami Hiramatsu (Google) <mhira...@kernel.org>
---
 kernel/trace/trace.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 0f010a34de84..5a064e712fd7 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -10090,15 +10090,6 @@ static void trace_module_remove_evals(struct module 
*mod)
 static inline void trace_module_remove_evals(struct module *mod) { }
 #endif /* CONFIG_TRACE_EVAL_MAP_FILE */
 
-static bool trace_array_active(struct trace_array *tr)
-{
-       if (tr->current_trace != &nop_trace)
-               return true;
-
-       /* 0 is no events, 1 is all disabled */
-       return trace_events_enabled(tr, NULL) > 1;
-}
-
 static void trace_module_record(struct module *mod)
 {
        struct trace_array *tr;
@@ -10107,9 +10098,7 @@ static void trace_module_record(struct module *mod)
                /* Update any persistent trace array that has already been 
started */
                if ((tr->flags & (TRACE_ARRAY_FL_BOOT | 
TRACE_ARRAY_FL_LAST_BOOT)) ==
                    TRACE_ARRAY_FL_BOOT) {
-                       /* Only update if the trace array is active */
-                       if (trace_array_active(tr))
-                               save_mod(mod, tr);
+                       save_mod(mod, tr);
                }
        }
 }


Reply via email to