mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Hulk Robot <hulkci@huawei.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Qais Yousef <qais.yousef@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] smp: Make symbol 'csd_bug_count' static
Date: Mon, 6 Jul 2020 11:37:03 -0700	[thread overview]
Message-ID: <20200706183703.GD9247@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200706134941.80472-1-weiyongjun1@huawei.com>

On Mon, Jul 06, 2020 at 09:49:41PM +0800, Wei Yongjun wrote:
> The sparse tool complains as follows
> 
> kernel/smp.c:107:10: warning:
>  symbol 'csd_bug_count' was not declared. Should it be static?
> 
> This variable is not used outside of smp.c, s this commit marks
> it static.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Good catches, applied both, thank you!

							Thanx, Paul

> ---
>  kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/smp.c b/kernel/smp.c
> index 6ec6c9578225..65822c1c3e67 100644
> --- a/kernel/smp.c
> +++ b/kernel/smp.c
> @@ -104,7 +104,7 @@ void __init call_function_init(void)
>  }
>  
>  #define CSD_LOCK_TIMEOUT (5 * 1000ULL) /* Milliseconds. */
> -atomic_t csd_bug_count = ATOMIC_INIT(0);
> +static atomic_t csd_bug_count = ATOMIC_INIT(0);
>  
>  /* Record current CSD work for current CPU, NULL to erase. */
>  static void csd_lock_record(call_single_data_t *csd)
> 

      reply	other threads:[~2020-07-06 18:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 13:49 Wei Yongjun
2020-07-06 18:37 ` Paul E. McKenney [this message]

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=20200706183703.GD9247@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=hulkci@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=tglx@linutronix.de \
    --cc=weiyongjun1@huawei.com \
    /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®