Skip to content

Commit

Permalink
kmemcheck: add missing braces to do-while in kmemcheck_annotate_bitfield
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and Vegard Nossum committed Sep 21, 2009
1 parent e3c6c4a commit 181f7c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/linux/kmemcheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down

0 comments on commit 181f7c5

Please sign in to comment.