From: Hannes Eder <hannes@hanneseder.net>
To: Ingo Molnar <mingo@elte.hu>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] trace: fix sparse warnings: make symbols static
Date: Tue, 10 Feb 2009 19:44:12 +0100 [thread overview]
Message-ID: <20090210184357.28131.39458.stgit@vmbox.hanneseder.net> (raw)
In-Reply-To: <20090210184214.28131.90564.stgit@vmbox.hanneseder.net>
Impact: make global variables and a global function static
The function '__trace_userstack' does not seem to have a caller, so it
is commented out.
Fix this sparse warnings:
kernel/trace/trace.c:82:5: warning: symbol 'tracing_disabled' was not declared. Should it be static?
kernel/trace/trace.c:600:10: warning: symbol 'trace_record_cmdline_disabled' was not declared. Should it be static?
kernel/trace/trace.c:957:6: warning: symbol '__trace_userstack' was not declared. Should it be static?
kernel/trace/trace.c:1694:5: warning: symbol 'tracing_release' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---
kernel/trace/trace.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ef4dbac..0e7c84f 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -79,7 +79,7 @@ static int dummy_set_flag(u32 old_flags, u32 bit, int set)
* of the tracer is successful. But that is the only place that sets
* this back to zero.
*/
-int tracing_disabled = 1;
+static int tracing_disabled = 1;
static DEFINE_PER_CPU(local_t, ftrace_cpu_disabled);
@@ -597,7 +597,7 @@ static int cmdline_idx;
static DEFINE_SPINLOCK(trace_cmdline_lock);
/* temporary disable recording */
-atomic_t trace_record_cmdline_disabled __read_mostly;
+static atomic_t trace_record_cmdline_disabled __read_mostly;
static void trace_init_cmdlines(void)
{
@@ -954,10 +954,12 @@ static void ftrace_trace_userstack(struct trace_array *tr,
#endif
}
-void __trace_userstack(struct trace_array *tr, unsigned long flags)
+#ifdef UNUSED
+static void __trace_userstack(struct trace_array *tr, unsigned long flags)
{
ftrace_trace_userstack(tr, flags, preempt_count());
}
+#endif /* UNUSED */
static void
ftrace_trace_special(void *__tr,
@@ -1691,7 +1693,7 @@ int tracing_open_generic(struct inode *inode, struct file *filp)
return 0;
}
-int tracing_release(struct inode *inode, struct file *file)
+static int tracing_release(struct inode *inode, struct file *file)
{
struct seq_file *m = (struct seq_file *)file->private_data;
struct trace_iterator *iter = m->private;
next prev parent reply other threads:[~2009-02-10 18:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-10 18:43 [PATCH 0/3] trace: fix sparse warnings Hannes Eder
2009-02-10 18:44 ` Hannes Eder [this message]
2009-02-10 21:42 ` [PATCH 1/3] trace: fix sparse warnings: make symbols static Frederic Weisbecker
2009-02-10 18:44 ` [PATCH 2/3] trace: fix sparse warnings: fix (un-)signedness Hannes Eder
2009-02-10 18:44 ` [PATCH 3/3] trace: fix sparce warning: attribute function with __acquires/__releases Hannes Eder
2009-02-11 9:16 ` [PATCH 0/3] trace: fix sparse warnings Ingo Molnar
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=20090210184357.28131.39458.stgit@vmbox.hanneseder.net \
--to=hannes@hanneseder.net \
--cc=kernel-janitors@vger.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®