[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <810a0dae47c90c39015903c413303fcee89ab5eb.camel@perches.com>
Date: Mon, 27 May 2019 10:21:22 -0700
From: Joe Perches <joe@...ches.com>
To: paulmck@...ux.ibm.com,
Andrea Parri <andrea.parri@...rulasolutions.com>
Cc: linux-kernel@...r.kernel.org,
Josh Triplett <josh@...htriplett.org>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Joel Fernandes <joel@...lfernandes.org>, rcu@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Will Deacon <will.deacon@....com>,
Mark Rutland <mark.rutland@....com>,
Matthew Wilcox <willy@...radead.org>,
Sasha Levin <sashal@...nel.org>, apw@...onical.com
Subject: Re: [PATCH v2] rcu: Don't return a value from rcu_assign_pointer()
On Mon, 2019-05-27 at 09:10 -0700, Paul E. McKenney wrote:
> On Mon, May 27, 2019 at 10:49:57AM +0200, Andrea Parri wrote:
> > Quoting Paul [1]:
> >
> > "Given that a quick (and perhaps error-prone) search of the uses
> > of rcu_assign_pointer() in v5.1 didn't find a single use of the
> > return value, let's please instead change the documentation and
> > implementation to eliminate the return value."
> >
> > [1] https://lkml.kernel.org/r/20190523135013.GL28207@linux.ibm.com
>
> Queued, thank you!
>
> Adding the checkpatch maintainers on CC as well. The "do { } while
> (0)" prevents the return value from being used, by design. Given the
> checkpatch complaint, is there some better way to achieve this?
Not sure what the checkpatch complaint is here.
Reading the link above, there seems to be a compiler warning.
Perhaps a statement expression macro with no return value?
#define rcu_assign_pointer(p, v) ({ (p) = (v); ; })
Powered by blists - more mailing lists