summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e3c6c4a)
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>
int name##_end[0];
#define kmemcheck_annotate_bitfield(ptr, name) \
int name##_end[0];
#define kmemcheck_annotate_bitfield(ptr, name) \
+ do { \
+ if (!ptr) \
+ break; \
+ \
int _n = (long) &((ptr)->name##_end) \
- (long) &((ptr)->name##_begin); \
BUILD_BUG_ON(_n < 0); \
int _n = (long) &((ptr)->name##_end) \
- (long) &((ptr)->name##_begin); \
BUILD_BUG_ON(_n < 0); \