Skip to content

Commit 739aa67

Browse files
vincent-mailholgregkh
authored andcommitted
bits: add comments and newlines to #if, #else and #endif directives
[ Upstream commit 31299a5 ] 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> Stable-dep-of: 2ba5772 ("gpio: idio-16: Define fixed direction of the GPIO lines") Signed-off-by: William Breathitt Gray <wbg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0e660d8 commit 739aa67

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

include/linux/bits.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,21 @@
1818
* GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
1919
*/
2020
#if !defined(__ASSEMBLY__)
21+
2122
#include <linux/build_bug.h>
2223
#define GENMASK_INPUT_CHECK(h, l) \
2324
(BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
2425
__is_constexpr((l) > (h)), (l) > (h), 0)))
25-
#else
26+
27+
#else /* defined(__ASSEMBLY__) */
28+
2629
/*
2730
* BUILD_BUG_ON_ZERO is not available in h files included from asm files,
2831
* disable the input check if that is the case.
2932
*/
3033
#define GENMASK_INPUT_CHECK(h, l) 0
31-
#endif
34+
35+
#endif /* !defined(__ASSEMBLY__) */
3236

3337
#define __GENMASK(h, l) \
3438
(((~UL(0)) - (UL(1) << (l)) + 1) & \

0 commit comments

Comments
 (0)