Re: [RFC PATCH rcu] rcutorture: err_segs_recorded can be static

From: Paul E. McKenney
Date: Tue Jul 17 2018 - 00:01:31 EST


On Tue, Jul 17, 2018 at 09:44:52AM +0800, kbuild test robot wrote:
>
> Fixes: 07809ecaa895 ("rcutorture: Dump reader protection sequence if failures or close calls")
> Signed-off-by: kbuild test robot <fengguang.wu@xxxxxxxxx>

Good catch! I have folded this in with attribution.

Thanx, Paul

> ---
> rcutorture.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
> index ef85bde..a7a947e 100644
> --- a/kernel/rcu/rcutorture.c
> +++ b/kernel/rcu/rcutorture.c
> @@ -209,9 +209,9 @@ struct rt_read_seg {
> unsigned long rt_delay_us;
> bool rt_preempted;
> };
> -int err_segs_recorded;
> -struct rt_read_seg err_segs[RCUTORTURE_RDR_MAX_SEGS];
> -int rt_read_nsegs;
> +static int err_segs_recorded;
> +static struct rt_read_seg err_segs[RCUTORTURE_RDR_MAX_SEGS];
> +static int rt_read_nsegs;
>
> static const char *rcu_torture_writer_state_getname(void)
> {
>