mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] locktorture: make function torture_percpu_rwsem_init() static
@ 2020-07-03  5:05 Wei Yongjun
  2020-07-06 22:52 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2020-07-03  5:05 UTC (permalink / raw)
  To: Hulk Robot, Davidlohr Bueso, Paul E. McKenney, Josh Triplett
  Cc: Wei Yongjun, linux-kernel

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>
---
 kernel/locking/locktorture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
index 9cfa5e89cff7..62d215b2e39f 100644
--- a/kernel/locking/locktorture.c
+++ b/kernel/locking/locktorture.c
@@ -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));
 }


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] locktorture: make function torture_percpu_rwsem_init() static
  2020-07-03  5:05 [PATCH -next] locktorture: make function torture_percpu_rwsem_init() static Wei Yongjun
@ 2020-07-06 22:52 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2020-07-06 22:52 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Hulk Robot, Davidlohr Bueso, Josh Triplett, linux-kernel

On Fri, Jul 03, 2020 at 01:05:27PM +0800, Wei Yongjun wrote:
> 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>

Applied, thank you!!!

							Thanx, Paul

> ---
>  kernel/locking/locktorture.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
> index 9cfa5e89cff7..62d215b2e39f 100644
> --- a/kernel/locking/locktorture.c
> +++ b/kernel/locking/locktorture.c
> @@ -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));
>  }
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-06 22:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03  5:05 [PATCH -next] locktorture: make function torture_percpu_rwsem_init() static Wei Yongjun
2020-07-06 22:52 ` Paul E. McKenney

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®