summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/locks.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-03-25 16:21:06 -0400
committerSteven Rostedt <rostedt@goodmis.org>2011-03-28 10:10:42 -0400
commitccd0d44fad38dc1bb4b26dcc7a30e9f2c3b36870 (patch)
tree4b3953b84fffb65bdf7b54955aed40d45d538e4a /fs/ocfs2/locks.c
parent18bcd0c8cb7d85a9063b88ec810dc1cdc0974518 (diff)
downloadlinux-ccd0d44fad38dc1bb4b26dcc7a30e9f2c3b36870.tar.bz2
WARN_ON_SMP(): Add comment to explain ({0;})
The define to use ({0;}) for the !CONFIG_SMP case of WARN_ON_SMP() can be confusing. As the WARN_ON_SMP() needs to be a nop when CONFIG_SMP is not set, including all its parameters must not be evaluated, and that it must work as both a stand alone statement and inside an if condition, we define it to a funky ({0;}). A simple "0" will not work as it causes gcc to give the warning that the statement has no effect. As this strange definition has raised a few eyebrows from some major kernel developers, it is wise to document why we create such a work of art. Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'fs/ocfs2/locks.c')
0 files changed, 0 insertions, 0 deletions