Skip to content

Commit

Permalink
locktorture: Make function torture_percpu_rwsem_init() static
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
Wei Yongjun authored and paulmckrcu committed Aug 25, 2020
1 parent fbb9f85 commit d49bed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/locking/locktorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit d49bed9

Please sign in to comment.