Skip to content

Commit

Permalink
scftorture: Make symbol 'scf_torture_rand' static
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and paulmckrcu committed Aug 25, 2020
1 parent ee7035d commit 9a52a57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/scftorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9a52a57

Please sign in to comment.