aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kmemcheck.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-06 05:53:03 -0400
committerVegard Nossum <vegard.nossum@gmail.com>2009-09-21 17:34:24 -0400
commit181f7c5dd3832763bdf2756b6d2d8a49bdf12791 (patch)
tree631dc0c343eac8f16e3f12d5b0a4e968858d40ad /include/linux/kmemcheck.h
parente3c6c4a8af9e3c4588235444774e66b6483b10ad (diff)
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.h5
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,
137 int name##_end[0]; 137 int name##_end[0];
138 138
139#define kmemcheck_annotate_bitfield(ptr, name) \ 139#define kmemcheck_annotate_bitfield(ptr, name) \
140 do if (ptr) { \ 140 do { \
141 if (!ptr) \
142 break; \
143 \
141 int _n = (long) &((ptr)->name##_end) \ 144 int _n = (long) &((ptr)->name##_end) \
142 - (long) &((ptr)->name##_begin); \ 145 - (long) &((ptr)->name##_begin); \
143 BUILD_BUG_ON(_n < 0); \ 146 BUILD_BUG_ON(_n < 0); \