[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190524112457.GA20149@andrea>
Date: Fri, 24 May 2019 13:24:57 +0200
From: Andrea Parri <andrea.parri@...rulasolutions.com>
To: Mark Rutland <mark.rutland@....com>
Cc: linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jorgen Hansen <jhansen@...are.com>,
Peter Zijlstra <peterz@...radead.org>,
Will Deacon <will.deacon@....com>,
"Paul E. McKenney" <paulmck@...ux.ibm.com>
Subject: Re: [PATCH 2/2] compiler: Prevent evaluation of WRITE_ONCE()
On Fri, May 24, 2019 at 11:53:40AM +0100, Mark Rutland wrote:
>
> This would be better titled as:
>
> compiler: don't return a value from WRITE_ONCE()
No strong opinion here: I'll adopt your suggestion in v2 if there are
no objections. And similarly for the rcu_assign_pointer() patch.
>
> ... since we do want the WRITE_ONCE() itself to be evaluated.
>
> On Fri, May 24, 2019 at 12:35:36PM +0200, Andrea Parri wrote:
> > Now that there's no single use of the value of WRITE_ONCE(), change
> > the implementation to eliminate it.
>
> I hope that's the case, but it's possible that some macros might be
> relying on this, so it's probably worth waiting to see if the kbuild
> test robot screams.
Absolutely! Does kbuild process your tree? I might be worth to apply
the patch to just see what kbuild 'think' about it...
>
> Otherwise, I agree that WRITE_ONCE() returning a value is surprising,
> and unnecessary. IIRC you said that trying to suport that in other
> implementations was painful, so aligning on a non-returning version
> sounds reasonable to me.
And I should probably also modify the few #define-s under tools/ (that
I missed in this iteration...)
Thanks,
Andrea
Powered by blists - more mailing lists