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: <1310707962.18875.349.camel@minggr.sh.intel.com>
Date:	Fri, 15 Jul 2011 13:32:42 +0800
From:	Lin Ming <ming.m.lin@...el.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] ftrace: Fix building warning with !CONFIG_FUNCTION_TRACER

Commit 43dd61c(ftrace: Fix regression of :mod:module function enabling)
causes below warning because ‘struct ftrace_hash’ is not declared with
!CONFIG_FUNCTION_TRACER.

In file included from /linux-2.6/include/linux/perf_event.h:508:0,
                 from /linux-2.6/include/linux/ftrace_event.h:8,
                 from /linux-2.6/include/trace/syscall.h:6,
                 from /linux-2.6/include/linux/syscalls.h:77,
                 from /linux-2.6/arch/x86/ia32/ipc32.c:4:
/linux-2.6/include/linux/ftrace.h:128:6: warning: ‘struct ftrace_hash’
declared inside parameter list [enabled by default]
/linux-2.6/include/linux/ftrace.h:128:6: warning: its scope is only this
definition or declaration, which is probably not what you want [enabled
by default]

Fixed it by declaring "struct ftrace_hash" outside of
#ifdef CONFIG_FUNCTION_TRACER

Signed-off-by: Lin Ming <ming.m.lin@...el.com>
---
 include/linux/ftrace.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index ed0eb52..f0c0e8a 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -19,6 +19,8 @@
 
 #include <asm/ftrace.h>
 
+struct ftrace_hash;
+
 #ifdef CONFIG_FUNCTION_TRACER
 
 extern int ftrace_enabled;
@@ -29,8 +31,6 @@ ftrace_enable_sysctl(struct ctl_table *table, int write,
 
 typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);
 
-struct ftrace_hash;
-
 enum {
 	FTRACE_OPS_FL_ENABLED		= 1 << 0,
 	FTRACE_OPS_FL_GLOBAL		= 1 << 1,


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ