]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Properly parenthesize cmpxchg() macro arguments
authorJan Beulich <JBeulich@suse.com>
Thu, 26 Jan 2012 15:47:37 +0000 (15:47 +0000)
committerIngo Molnar <mingo@elte.hu>
Thu, 26 Jan 2012 20:18:29 +0000 (21:18 +0100)
commita1148ace0fdab7b3ad318f8d0b0a673252b313f7
tree45dc8b5453cb6d5c4db821d8dfa751b96fec93c3
parentf6c38755cefcf74f60847013b15a004c10252dd8
x86: Properly parenthesize cmpxchg() macro arguments

Quite oddly, all of the arguments passed through from the top
level macros to the second level which didn't need parentheses
had them, while the only expression (involving a parameter)
needing them didn't.

Very recently I got bitten by the lack thereof when using
something like "array + index" for the first operand, with
"array" being an array more narrow than int.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/4F2183A9020000780006F3E6@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/cmpxchg.h