Skip to content

Commit 31299a5

Browse files
vincent-mailholYuryNorov
authored andcommitted
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>
1 parent 791a9b2 commit 31299a5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

include/linux/bits.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,21 @@
1919
* GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
2020
*/
2121
#if !defined(__ASSEMBLY__)
22+
2223
#include <linux/build_bug.h>
2324
#include <linux/compiler.h>
25+
2426
#define GENMASK_INPUT_CHECK(h, l) BUILD_BUG_ON_ZERO(const_true((l) > (h)))
25-
#else
27+
28+
#else /* defined(__ASSEMBLY__) */
29+
2630
/*
2731
* BUILD_BUG_ON_ZERO is not available in h files included from asm files,
2832
* disable the input check if that is the case.
2933
*/
3034
#define GENMASK_INPUT_CHECK(h, l) 0
31-
#endif
35+
36+
#endif /* !defined(__ASSEMBLY__) */
3237

3338
#define GENMASK(h, l) \
3439
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))

0 commit comments

Comments
 (0)