Re: [PATCH tip/core/rcu 06/17] rcu: Remove return value from RCU_INIT_POINTER()

From: David Howells
Date: Fri Jun 22 2012 - 12:07:41 EST


Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx> wrote:

> From: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
>
> The return value from RCU_INIT_POINTER() is not used, and using it
> would be quite ugly, for example:
>
> q = RCU_INIT_POINTER(global_p, p);
>
> To prevent this sort of ugliness from appearing, this commit wraps
> RCU_INIT_POINTER() in a do-while loop.
>
> Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>

Acked-by: David Howells <dhowells@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/