All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Hannes Eder <hannes@hanneseder.net>
Cc: Ingo Molnar <mingo@elte.hu>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] trace: fix sparse warnings: make symbols static
Date: Tue, 10 Feb 2009 22:42:08 +0100	[thread overview]
Message-ID: <20090210214207.GB4879@nowhere> (raw)
In-Reply-To: <20090210184357.28131.39458.stgit@vmbox.hanneseder.net>

On Tue, Feb 10, 2009 at 07:44:12PM +0100, Hannes Eder wrote:
> 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.


I guess it can even be dropped :-)

 
> 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;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


WARNING: multiple messages have this Message-ID (diff)
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Hannes Eder <hannes@hanneseder.net>
Cc: Ingo Molnar <mingo@elte.hu>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] trace: fix sparse warnings: make symbols static
Date: Tue, 10 Feb 2009 21:42:08 +0000	[thread overview]
Message-ID: <20090210214207.GB4879@nowhere> (raw)
In-Reply-To: <20090210184357.28131.39458.stgit@vmbox.hanneseder.net>

On Tue, Feb 10, 2009 at 07:44:12PM +0100, Hannes Eder wrote:
> 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.


I guess it can even be dropped :-)

 
> 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;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2009-02-10 21:42 UTC|newest]

Thread overview: 12+ 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:43 ` Hannes Eder
2009-02-10 18:44 ` [PATCH 1/3] trace: fix sparse warnings: make symbols static Hannes Eder
2009-02-10 18:44   ` Hannes Eder
2009-02-10 21:42   ` Frederic Weisbecker [this message]
2009-02-10 21:42     ` Frederic Weisbecker
2009-02-10 18:44 ` [PATCH 2/3] trace: fix sparse warnings: fix (un-)signedness Hannes Eder
2009-02-10 18:44   ` Hannes Eder
2009-02-10 18:44 ` [PATCH 3/3] trace: fix sparce warning: attribute function with __acquires/__releases Hannes Eder
2009-02-10 18:44   ` [PATCH 3/3] trace: fix sparce warning: attribute function with Hannes Eder
2009-02-11  9:16 ` [PATCH 0/3] trace: fix sparse warnings Ingo Molnar
2009-02-11  9:16   ` 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=20090210214207.GB4879@nowhere \
    --to=fweisbec@gmail.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.