lkml.org 
[lkml]   [2015]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] rcu: Remove unnecessary condition check in rcu_qsctr_help()
On Wed, Feb 11, 2015 at 03:42:37PM +0100, Alexander Gordeev wrote:
> In cases ->curtail and ->donetail pointers differ ->rcucblist
> always points to the beginning of the current list and thus
> can not be NULL. Therefore, the check ->rcucblist != NULL is
> redundant and could be removed.
>
> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>

Good point, queued for 3.21.

Thanx, Paul

> ---
> kernel/rcu/tiny.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
> index cc9ceca..d4e7fe5 100644
> --- a/kernel/rcu/tiny.c
> +++ b/kernel/rcu/tiny.c
> @@ -103,8 +103,7 @@ EXPORT_SYMBOL(__rcu_is_watching);
> static int rcu_qsctr_help(struct rcu_ctrlblk *rcp)
> {
> RCU_TRACE(reset_cpu_stall_ticks(rcp));
> - if (rcp->rcucblist != NULL &&
> - rcp->donetail != rcp->curtail) {
> + if (rcp->donetail != rcp->curtail) {
> rcp->donetail = rcp->curtail;
> return 1;
> }
> --
> 1.8.3.1
>



\
 
 \ /
  Last update: 2015-02-11 17:21    [W:0.047 / U:4.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site