lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171013120135.3943860-1-arnd@arndb.de>
Date:   Fri, 13 Oct 2017 14:01:13 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>
Cc:     Arnd Bergmann <arnd@...db.de>, Joel Fernandes <joelaf@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] tracing: hide unused functions

After trace_selftest_startup_sched_switch is removed, trace_test_buffer()
is now only used inside of CONFIG_FUNCTION_TRACER, leading to this
warning:

kernel/trace/trace_selftest.c:62:12: error: 'trace_test_buffer' defined but not used [-Werror=unused-function]

The same is true for a few other functions called by trace_test_buffer(),
so let's extend the #ifdef to cover all of them together.

Fixes: d8c4deee6dc6 ("tracing: Remove obsolete sched_switch tracer selftest")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 kernel/trace/trace_selftest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 364f78abdf47..bcdffeca9bd8 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -6,6 +6,8 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 
+#ifdef CONFIG_FUNCTION_TRACER
+
 static inline int trace_valid_entry(struct trace_entry *entry)
 {
 	switch (entry->type) {
@@ -98,7 +100,6 @@ static inline void warn_failed_init_tracer(struct tracer *trace, int init_ret)
 	printk(KERN_WARNING "Failed to init %s tracer, init returned %d\n",
 		trace->name, init_ret);
 }
-#ifdef CONFIG_FUNCTION_TRACER
 
 #ifdef CONFIG_DYNAMIC_FTRACE
 
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ