mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jaswinder Singh Rajput <jaswinder@kernel.org>
Subject: [PATCH 1/6] tracing: add static to generated TRACE_EVENT functions
Date: Mon, 14 Sep 2009 12:33:56 -0400	[thread overview]
Message-ID: <20090914163435.952042625@goodmis.org> (raw)
In-Reply-To: <20090914163355.162375454@goodmis.org>

[-- Attachment #1: 0001-tracing-add-static-to-generated-TRACE_EVENT-function.patch --]
[-- Type: text/plain, Size: 1714 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

Some of the generated functions used in the TRACE_EVENT macros are
not declared static, but they are not global.

Discovered by sparse.

Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/trace/ftrace.h      |    4 ++--
 kernel/trace/trace_events.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 308bafd..fa8ce03 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -254,7 +254,7 @@ ftrace_format_##call(struct ftrace_event_call *unused,			\
 
 #undef TRACE_EVENT
 #define TRACE_EVENT(call, proto, args, tstruct, assign, print)		\
-enum print_line_t							\
+static enum print_line_t						\
 ftrace_raw_output_##call(struct trace_iterator *iter, int flags)	\
 {									\
 	struct trace_seq *s = &iter->seq;				\
@@ -317,7 +317,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags)	\
 
 #undef TRACE_EVENT
 #define TRACE_EVENT(call, proto, args, tstruct, func, print)		\
-int									\
+static int								\
 ftrace_define_fields_##call(struct ftrace_event_call *event_call)	\
 {									\
 	struct ftrace_raw_##call field;					\
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index adbed12..0fa8f9f 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1154,7 +1154,7 @@ static int trace_module_notify(struct notifier_block *self,
 }
 #endif /* CONFIG_MODULES */
 
-struct notifier_block trace_module_nb = {
+static struct notifier_block trace_module_nb = {
 	.notifier_call = trace_module_notify,
 	.priority = 0,
 };
-- 
1.6.3.3

-- 

  reply	other threads:[~2009-09-14 16:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14 16:33 [PATCH 0/6] [GIT PULL] tracing: various fixes Steven Rostedt
2009-09-14 16:33 ` Steven Rostedt [this message]
2009-09-14 16:33 ` [PATCH 2/6] tracing: have TRACE_EVENT macro use __flags to not shadow parameter Steven Rostedt
2009-09-14 16:33 ` [PATCH 3/6] tracing: fix F_printk() typos Steven Rostedt
2009-09-14 16:33 ` [PATCH 4/6] ftrace: add compile-time check on F_printk() Steven Rostedt
2009-09-14 16:34 ` [PATCH 5/6] tracing: remove some unused macros Steven Rostedt
2009-09-14 16:34 ` [PATCH 6/6] tracing: make testing syscall events a separate configuration Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090914163435.952042625@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=jaswinder@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®