Message ID | 20241024164558.715296-2-urezki@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Commit | 1715e13f68c8e5034ac116b0cf75cf1d3be23dec |
Headers | show |
Series | [1/2] rcuscale: Do a proper cleanup if kfree_scale_init() fails | expand |
On Thu, Oct 24, 2024 at 06:45:58PM +0200, Uladzislau Rezki (Sony) wrote: > There are two places where WARN_ON_ONCE() is called two times > in the error paths. One which is encapsulated into if() condition > and another one, which is unnecessary, is placed in the brackets. > > Remove an extra WARN_ON_ONCE() splat which is in brackets. > > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> For both: Reviewed-by: Paul E. McKenney <paulmck@kernel.org> > --- > kernel/rcu/rcuscale.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c > index de7d511e6be4..1d8bb603c289 100644 > --- a/kernel/rcu/rcuscale.c > +++ b/kernel/rcu/rcuscale.c > @@ -889,13 +889,11 @@ kfree_scale_init(void) > > if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start < 2 * HZ)) { > pr_alert("ERROR: call_rcu() CBs are not being lazy as expected!\n"); > - WARN_ON_ONCE(1); > goto unwind; > } > > if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start > 3 * HZ)) { > pr_alert("ERROR: call_rcu() CBs are being too lazy!\n"); > - WARN_ON_ONCE(1); > goto unwind; > } > } > -- > 2.39.5 >
On Thu, Oct 24, 2024 at 01:28:24PM -0700, Paul E. McKenney wrote: > On Thu, Oct 24, 2024 at 06:45:58PM +0200, Uladzislau Rezki (Sony) wrote: > > There are two places where WARN_ON_ONCE() is called two times > > in the error paths. One which is encapsulated into if() condition > > and another one, which is unnecessary, is placed in the brackets. > > > > Remove an extra WARN_ON_ONCE() splat which is in brackets. > > > > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> > > For both: > > Reviewed-by: Paul E. McKenney <paulmck@kernel.org> > Thank you :) -- Uladzislau Rezki
Le Thu, Oct 24, 2024 at 01:28:24PM -0700, Paul E. McKenney a écrit : > On Thu, Oct 24, 2024 at 06:45:58PM +0200, Uladzislau Rezki (Sony) wrote: > > There are two places where WARN_ON_ONCE() is called two times > > in the error paths. One which is encapsulated into if() condition > > and another one, which is unnecessary, is placed in the brackets. > > > > Remove an extra WARN_ON_ONCE() splat which is in brackets. > > > > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> > > For both: > > Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Both applied! Thanks.
diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c index de7d511e6be4..1d8bb603c289 100644 --- a/kernel/rcu/rcuscale.c +++ b/kernel/rcu/rcuscale.c @@ -889,13 +889,11 @@ kfree_scale_init(void) if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start < 2 * HZ)) { pr_alert("ERROR: call_rcu() CBs are not being lazy as expected!\n"); - WARN_ON_ONCE(1); goto unwind; } if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start > 3 * HZ)) { pr_alert("ERROR: call_rcu() CBs are being too lazy!\n"); - WARN_ON_ONCE(1); goto unwind; } }
There are two places where WARN_ON_ONCE() is called two times in the error paths. One which is encapsulated into if() condition and another one, which is unnecessary, is placed in the brackets. Remove an extra WARN_ON_ONCE() splat which is in brackets. Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> --- kernel/rcu/rcuscale.c | 2 -- 1 file changed, 2 deletions(-)