[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211006172207.11982951@gandalf.local.home>
Date: Wed, 6 Oct 2021 17:22:07 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: linux-next: Tree for Oct 5 (warnings: a. trace; b. mm/migrate)
On Tue, 5 Oct 2021 13:46:52 -0700
Randy Dunlap <rdunlap@...radead.org> wrote:
> a. randconfig: KCONFIG_SEED=0xBFBEA13C
> ../kernel/trace/trace.c:1712:13: error: 'trace_create_maxlat_file' defined but not used [-Werror=unused-function]
> static void trace_create_maxlat_file(struct trace_array *tr,
Does this fix it?
-- Steve
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 7896d30d90f7..4520cbab0da5 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1744,16 +1744,15 @@ void latency_fsnotify(struct trace_array *tr)
irq_work_queue(&tr->fsnotify_irqwork);
}
-/*
- * (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \
- * defined(CONFIG_FSNOTIFY)
- */
-#else
+/* CONFIG_FSNOTIFY else */
+#elif CREATE_MAX_TRACE_FILE
#define trace_create_maxlat_file(tr, d_tracer) \
trace_create_file("tracing_max_latency", 0644, d_tracer, \
&tr->max_latency, &tracing_max_lat_fops)
+#else
+#define trace_create_maxlat_file(tr, d_tracer) do { } while (0)
#endif
#ifdef CONFIG_TRACER_MAX_TRACE
@@ -9473,9 +9472,7 @@ init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer)
create_trace_options_dir(tr);
-#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)
trace_create_maxlat_file(tr, d_tracer);
-#endif
if (ftrace_create_function_files(tr, d_tracer))
MEM_FAIL(1, "Could not allocate function filter files");
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index b7c0f8e160fb..680935949aef 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -679,8 +679,11 @@ void update_max_tr_single(struct trace_array *tr,
#endif /* CONFIG_TRACER_MAX_TRACE */
#if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
- || defined(CONFIG_OSNOISE_TRACER)) && defined(CONFIG_FSNOTIFY)
-#define LATENCY_FS_NOTIFY
+ || defined(CONFIG_OSNOISE_TRACER))
+# define CREATE_MAX_TRACE_FILE
+# ifdef CONFIG_FSNOTIFY
+# define LATENCY_FS_NOTIFY
+# endif
#endif
#ifdef LATENCY_FS_NOTIFY
Powered by blists - more mailing lists