diff options
author | Mark Rutland <[email protected]> | 2018-04-04 17:34:45 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2018-04-12 09:30:09 -0300 |
commit | 4d3b57da1593c66835d8e3a757e4751b35493fb8 (patch) | |
tree | 83e082d0151837b0a8db73fa5429abcdcaf4905d /scripts/gdb | |
parent | 9dc9a95f03a69ab926d9ff1986ab2087f34a5dce (diff) |
tools headers: Restore READ_ONCE() C++ compatibility
Our userspace <linux/compiler.h> defines READ_ONCE() in a way that clang
doesn't like, as we have an anonymous union in which neither field is
initialized.
WRITE_ONCE() is fine since it initializes the __val field. For
READ_ONCE() we can keep clang and GCC happy with a dummy initialization
of the __c field, so let's do that.
At the same time, let's split READ_ONCE() and WRITE_ONCE() over several
lines for legibility, as we do in the in-kernel <linux/compiler.h>.
Reported-by: Li Zhijian <[email protected]>
Reported-by: Sandipan Das <[email protected]>
Tested-by: Sandipan Das <[email protected]>
Signed-off-by: Mark Rutland <[email protected]>
Fixes: 6aa7de059173a986 ("locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'scripts/gdb')
0 files changed, 0 insertions, 0 deletions