* [PATCH -next] smp: Make symbol 'csd_bug_count' static
@ 2020-07-06 13:49 Wei Yongjun
2020-07-06 18:37 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2020-07-06 13:49 UTC (permalink / raw)
To: Hulk Robot, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
Sebastian Andrzej Siewior, Paul E. McKenney, Qais Yousef
Cc: Wei Yongjun, linux-kernel
The sparse tool complains as follows
kernel/smp.c:107:10: warning:
symbol 'csd_bug_count' was not declared. Should it be static?
This variable is not used outside of smp.c, s this commit marks
it static.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
kernel/smp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/smp.c b/kernel/smp.c
index 6ec6c9578225..65822c1c3e67 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -104,7 +104,7 @@ void __init call_function_init(void)
}
#define CSD_LOCK_TIMEOUT (5 * 1000ULL) /* Milliseconds. */
-atomic_t csd_bug_count = ATOMIC_INIT(0);
+static atomic_t csd_bug_count = ATOMIC_INIT(0);
/* Record current CSD work for current CPU, NULL to erase. */
static void csd_lock_record(call_single_data_t *csd)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] smp: Make symbol 'csd_bug_count' static
2020-07-06 13:49 [PATCH -next] smp: Make symbol 'csd_bug_count' static Wei Yongjun
@ 2020-07-06 18:37 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2020-07-06 18:37 UTC (permalink / raw)
To: Wei Yongjun
Cc: Hulk Robot, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
Sebastian Andrzej Siewior, Qais Yousef, linux-kernel
On Mon, Jul 06, 2020 at 09:49:41PM +0800, Wei Yongjun wrote:
> The sparse tool complains as follows
>
> kernel/smp.c:107:10: warning:
> symbol 'csd_bug_count' was not declared. Should it be static?
>
> This variable is not used outside of smp.c, s this commit marks
> it static.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Good catches, applied both, thank you!
Thanx, Paul
> ---
> kernel/smp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/smp.c b/kernel/smp.c
> index 6ec6c9578225..65822c1c3e67 100644
> --- a/kernel/smp.c
> +++ b/kernel/smp.c
> @@ -104,7 +104,7 @@ void __init call_function_init(void)
> }
>
> #define CSD_LOCK_TIMEOUT (5 * 1000ULL) /* Milliseconds. */
> -atomic_t csd_bug_count = ATOMIC_INIT(0);
> +static atomic_t csd_bug_count = ATOMIC_INIT(0);
>
> /* Record current CSD work for current CPU, NULL to erase. */
> static void csd_lock_record(call_single_data_t *csd)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-06 18:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 13:49 [PATCH -next] smp: Make symbol 'csd_bug_count' static Wei Yongjun
2020-07-06 18:37 ` Paul E. McKenney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.