locktorture: Make function torture_percpu_rwsem_init() static
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 3 Jul 2020 05:05:27 +0000 (13:05 +0800)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 25 Aug 2020 01:45:32 +0000 (18:45 -0700)
The sparse tool complains as follows:

kernel/locking/locktorture.c:569:6: warning:
 symbol 'torture_percpu_rwsem_init' was not declared. Should it be static?

And this function is not used outside of locktorture.c,
so this commit marks it static.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/locking/locktorture.c

index 9cfa5e89cff7fd10ef08c64a17fd0a9f95747b1f..62d215b2e39f608ff6ed313d0d876c288ce85161 100644 (file)
@@ -566,7 +566,7 @@ static struct lock_torture_ops rwsem_lock_ops = {
 #include <linux/percpu-rwsem.h>
 static struct percpu_rw_semaphore pcpu_rwsem;
 
-void torture_percpu_rwsem_init(void)
+static void torture_percpu_rwsem_init(void)
 {
        BUG_ON(percpu_init_rwsem(&pcpu_rwsem));
 }