diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 11:07:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 11:07:54 -0400 |
commit | 991d79b0d1255f89267a350b0048eca59f100cbb (patch) | |
tree | 65ddf4160f959952d9f4955fda8844374768b83e /include | |
parent | a87e84b5cdfacf11af4e8a85c4bca9793658536f (diff) | |
parent | 181f7c5dd3832763bdf2756b6d2d8a49bdf12791 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vegard/kmemcheck
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vegard/kmemcheck:
kmemcheck: add missing braces to do-while in kmemcheck_annotate_bitfield
kmemcheck: update documentation
kmemcheck: depend on HAVE_ARCH_KMEMCHECK
kmemcheck: remove useless check
kmemcheck: remove duplicated #include
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kmemcheck.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h index dc2fd545db00..c8006607f947 100644 --- a/include/linux/kmemcheck.h +++ b/include/linux/kmemcheck.h | |||
@@ -144,7 +144,10 @@ static inline bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size) | |||
144 | int name##_end[0]; | 144 | int name##_end[0]; |
145 | 145 | ||
146 | #define kmemcheck_annotate_bitfield(ptr, name) \ | 146 | #define kmemcheck_annotate_bitfield(ptr, name) \ |
147 | do if (ptr) { \ | 147 | do { \ |
148 | if (!ptr) \ | ||
149 | break; \ | ||
150 | \ | ||
148 | int _n = (long) &((ptr)->name##_end) \ | 151 | int _n = (long) &((ptr)->name##_end) \ |
149 | - (long) &((ptr)->name##_begin); \ | 152 | - (long) &((ptr)->name##_begin); \ |
150 | BUILD_BUG_ON(_n < 0); \ | 153 | BUILD_BUG_ON(_n < 0); \ |