Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 181f7c5d authored by Johannes Berg's avatar Johannes Berg Committed by Vegard Nossum
Browse files

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: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
parent e3c6c4a8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);					\