aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorLinus Torvalds <[email protected]>2015-02-20 23:46:31 +0000
committerLinus Torvalds <[email protected]>2015-02-21 18:27:33 +0000
commitdd36929720f40f17685e841ae0d4c581c165ea60 (patch)
tree62743edeac21a222371f9032fa1f0e59531c38ce /lib/dynamic_debug.c
parentMerge tag 'for_linux-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadkernel-dd36929720f40f17685e841ae0d4c581c165ea60.tar.gz
kernel-dd36929720f40f17685e841ae0d4c581c165ea60.zip
kernel: make READ_ONCE() valid on const arguments
The use of READ_ONCE() causes lots of warnings witht he pending paravirt spinlock fixes, because those ends up having passing a member to a 'const' structure to READ_ONCE(). There should certainly be nothing wrong with using READ_ONCE() with a const source, but the helper function __read_once_size() would cause warnings because it would drop the 'const' qualifier, but also because the destination would be marked 'const' too due to the use of 'typeof'. Use a union of types in READ_ONCE() to avoid this issue. Also make sure to use parenthesis around the macro arguments to avoid possible operator precedence issues. Tested-by: Ingo Molnar <[email protected]> Cc: Christian Borntraeger <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions