From: Andrea Parri <andrea.parri@amarulasolutions.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jorgen Hansen <jhansen@vmware.com>,
Peter Zijlstra <peterz@infradead.org>,
Will Deacon <will.deacon@arm.com>,
"Paul E. McKenney" <paulmck@linux.ibm.com>
Subject: Re: [PATCH 2/2] compiler: Prevent evaluation of WRITE_ONCE()
Date: Fri, 24 May 2019 13:24:57 +0200 [thread overview]
Message-ID: <20190524112457.GA20149@andrea> (raw)
In-Reply-To: <20190524105339.GC12796@lakrids.cambridge.arm.com>
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
prev parent reply other threads:[~2019-05-24 11:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 10:35 [PATCH 0/2] Prevent evaluation of WRITE_ONCE() Andrea Parri
2019-05-24 10:35 ` [PATCH 1/2] vmw_vmci: Clean up uses of atomic*_set() Andrea Parri
2019-05-24 10:39 ` Peter Zijlstra
2019-05-24 11:40 ` Greg Kroah-Hartman
2019-05-24 11:59 ` Andrea Parri
2019-05-24 11:56 ` Andrea Parri
2019-05-24 10:35 ` [PATCH 2/2] compiler: Prevent evaluation of WRITE_ONCE() Andrea Parri
2019-05-24 10:53 ` Mark Rutland
2019-05-24 11:24 ` Andrea Parri [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190524112457.GA20149@andrea \
--to=andrea.parri@amarulasolutions.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jhansen@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=paulmck@linux.ibm.com \
--cc=peterz@infradead.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.