Fix the following sparse warning:
kernel/rcu/rcutorture.c:1695:16: warning: symbol 'rcu_fwds' was not
declared. Should it be static?
kernel/rcu/rcutorture.c:1696:6: warning: symbol 'rcu_fwd_emergency_stop'
was not declared. Should it be static?
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
---
kernel/rcu/rcutorture.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 5453bd557f43..d621a31de8a4 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -1692,8 +1692,8 @@ struct rcu_fwd {
unsigned long rcu_launder_gp_seq_start;
};
-struct rcu_fwd *rcu_fwds;
-bool rcu_fwd_emergency_stop;
+static struct rcu_fwd *rcu_fwds;
+static bool rcu_fwd_emergency_stop;
static void rcu_torture_fwd_cb_hist(struct rcu_fwd *rfp)
{
--
2.17.2
On Thu, Apr 09, 2020 at 07:42:38PM +0800, Jason Yan wrote:
> Fix the following sparse warning:
>
> kernel/rcu/rcutorture.c:1695:16: warning: symbol 'rcu_fwds' was not
> declared. Should it be static?
> kernel/rcu/rcutorture.c:1696:6: warning: symbol 'rcu_fwd_emergency_stop'
> was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Jason Yan <[email protected]>
Good catch, queued, thank you!
Thanx, Paul
> ---
> kernel/rcu/rcutorture.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
> index 5453bd557f43..d621a31de8a4 100644
> --- a/kernel/rcu/rcutorture.c
> +++ b/kernel/rcu/rcutorture.c
> @@ -1692,8 +1692,8 @@ struct rcu_fwd {
> unsigned long rcu_launder_gp_seq_start;
> };
>
> -struct rcu_fwd *rcu_fwds;
> -bool rcu_fwd_emergency_stop;
> +static struct rcu_fwd *rcu_fwds;
> +static bool rcu_fwd_emergency_stop;
>
> static void rcu_torture_fwd_cb_hist(struct rcu_fwd *rfp)
> {
> --
> 2.17.2
>