Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bits: add comments and newlines to #if, #else and #endif directives

This is a preparation for the upcoming GENMASK_U*() and BIT_U*()
changes. After introducing those new macros, there will be a lot of
scrolling between the #if, #else and #endif.

Add a comment to the #else and #endif preprocessor macros to help keep
track of which context we are in. Also, add new lines to better
visually separate the non-asm and asm sections.

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Yury Norov <yury.norov@gmail.com>

authored by

Vincent Mailhol and committed by
Yury Norov
31299a5e 791a9b25

+7 -2
+7 -2
include/linux/bits.h
··· 19 19 * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. 20 20 */ 21 21 #if !defined(__ASSEMBLY__) 22 + 22 23 #include <linux/build_bug.h> 23 24 #include <linux/compiler.h> 25 + 24 26 #define GENMASK_INPUT_CHECK(h, l) BUILD_BUG_ON_ZERO(const_true((l) > (h))) 25 - #else 27 + 28 + #else /* defined(__ASSEMBLY__) */ 29 + 26 30 /* 27 31 * BUILD_BUG_ON_ZERO is not available in h files included from asm files, 28 32 * disable the input check if that is the case. 29 33 */ 30 34 #define GENMASK_INPUT_CHECK(h, l) 0 31 - #endif 35 + 36 + #endif /* !defined(__ASSEMBLY__) */ 32 37 33 38 #define GENMASK(h, l) \ 34 39 (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))