diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-07-06 11:53:03 +0200 |
---|---|---|
committer | Vegard Nossum <vegard.nossum@gmail.com> | 2009-09-21 23:34:24 +0200 |
commit | 181f7c5dd3832763bdf2756b6d2d8a49bdf12791 (patch) | |
tree | 631dc0c343eac8f16e3f12d5b0a4e968858d40ad /include/linux/kmemcheck.h | |
parent | e3c6c4a8af9e3c4588235444774e66b6483b10ad (diff) | |
download | blackbird-op-linux-181f7c5dd3832763bdf2756b6d2d8a49bdf12791.tar.gz blackbird-op-linux-181f7c5dd3832763bdf2756b6d2d8a49bdf12791.zip |
kmemcheck: add missing braces to do-while in kmemcheck_annotate_bitfield
Whether or not the sparse warning
warning: do-while statement is not a compound statement
is justified or not in this case, it is annoying and trivial to fix.
[vegard.nossum@gmail.com: title and cleanup]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Diffstat (limited to 'include/linux/kmemcheck.h')
-rw-r--r-- | include/linux/kmemcheck.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h index 47b39b7c7e84..06c6c5501f13 100644 --- a/include/linux/kmemcheck.h +++ b/include/linux/kmemcheck.h @@ -137,7 +137,10 @@ static inline void kmemcheck_mark_initialized_pages(struct page *p, int name##_end[0]; #define kmemcheck_annotate_bitfield(ptr, name) \ - do if (ptr) { \ + do { \ + if (!ptr) \ + break; \ + \ int _n = (long) &((ptr)->name##_end) \ - (long) &((ptr)->name##_begin); \ BUILD_BUG_ON(_n < 0); \ |