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>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] scftorture: Make symbol 'scf_torture_rand' static
Date: Thu, 2 Jul 2020 10:02:47 -0700	[thread overview]
Message-ID: <20200702170247.GS9247@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200702144700.3602-1-weiyongjun1@huawei.com>

On Thu, Jul 02, 2020 at 10:47:00PM +0800, Wei Yongjun wrote:
> Fix sparse build warning:
> 
> kernel/scftorture.c:124:1: warning:
>  symbol '__pcpu_scope_scf_torture_rand' was not declared. Should it be static?
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Good catch, applied, thank you!

Due to recent changes, I hand-applied this as shown below.  Please
let me know if I messed anything up.

							Thanx, Paul

------------------------------------------------------------------------

commit ff9210137b0b8d8f045dd1fd116253ba7686e892
Author: Wei Yongjun <weiyongjun1@huawei.com>
Date:   Thu Jul 2 09:56:50 2020 -0700

    scftorture: Make symbol 'scf_torture_rand' static
    
    The sparse tool complains as follows
    
    kernel/scftorture.c:124:1: warning:
     symbol '__pcpu_scope_scf_torture_rand' was not declared. Should it be static?
    
    And this per-CPU variable is not used outside of scftorture.c,
    so this commit marks it static.
    
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

diff --git a/kernel/scftorture.c b/kernel/scftorture.c
index 52f74f1..a7fea76 100644
--- a/kernel/scftorture.c
+++ b/kernel/scftorture.c
@@ -134,7 +134,7 @@ static atomic_t n_alloc_errs;
 static bool scfdone;
 static char *bangstr = "";
 
-DEFINE_TORTURE_RANDOM_PERCPU(scf_torture_rand);
+static DEFINE_TORTURE_RANDOM_PERCPU(scf_torture_rand);
 
 // Print torture statistics.  Caller must ensure serialization.
 static void scf_torture_stats_print(void)

      reply	other threads:[~2020-07-02 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 14:47 Wei Yongjun
2020-07-02 17:02 ` 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=20200702170247.GS9247@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=hulkci@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --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®