diff options
| author | Vincent Mailhol <mailhol.vincent@wanadoo.fr> | 2025-10-31 22:11:57 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-11-02 22:14:41 +0900 |
| commit | 739aa67ef147b700cbe1002e589f267f2c39fcbe (patch) | |
| tree | b48c52b51e494faf837ac3b2eb1ae11fbaad43de | |
| parent | 0e660d8224d075eb32ecc9f60d6a891efda5b0df (diff) | |
| download | linux-739aa67ef147b700cbe1002e589f267f2c39fcbe.tar.gz linux-739aa67ef147b700cbe1002e589f267f2c39fcbe.tar.bz2 linux-739aa67ef147b700cbe1002e589f267f2c39fcbe.zip | |
bits: add comments and newlines to #if, #else and #endif directives
[ Upstream commit 31299a5e0211241171b2222c5633aad4763bf700 ]
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: 2ba5772e530f ("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>
| -rw-r--r-- | include/linux/bits.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/bits.h b/include/linux/bits.h index 7c0cf5031abe..9cbd9d0b853c 100644 --- a/include/linux/bits.h +++ b/include/linux/bits.h @@ -18,17 +18,21 @@ * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. */ #if !defined(__ASSEMBLY__) + #include <linux/build_bug.h> #define GENMASK_INPUT_CHECK(h, l) \ (BUILD_BUG_ON_ZERO(__builtin_choose_expr( \ __is_constexpr((l) > (h)), (l) > (h), 0))) -#else + +#else /* defined(__ASSEMBLY__) */ + /* * BUILD_BUG_ON_ZERO is not available in h files included from asm files, * disable the input check if that is the case. */ #define GENMASK_INPUT_CHECK(h, l) 0 -#endif + +#endif /* !defined(__ASSEMBLY__) */ #define __GENMASK(h, l) \ (((~UL(0)) - (UL(1) << (l)) + 1) & \ |
