From: Johannes Berg Date: Mon, 6 Jul 2009 09:53:03 +0000 (+0200) Subject: kmemcheck: add missing braces to do-while in kmemcheck_annotate_bitfield X-Git-Tag: v2.6.32-rc1~411^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=181f7c5dd3832763bdf2756b6d2d8a49bdf12791 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 Signed-off-by: Vegard Nossum --- 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); \