[v1,1/1] vdso/bits.h: Add BIT_ULL() for the sake of consistency

Message ID 20221128141003.77929-1-andriy.shevchenko@linux.intel.com
State New
Headers
Series [v1,1/1] vdso/bits.h: Add BIT_ULL() for the sake of consistency |

Commit Message

Andy Shevchenko Nov. 28, 2022, 2:10 p.m. UTC
  While the minimization is a good thing, the split added some
inconsistency since BIT() and BIT_ULL() defined in the different
files and confuses unprepared reader. Let's move BIT_ULL()
to vdso/bits.h, so they will go together (as UL(), ULL() and
so on).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/bits.h | 1 -
 include/vdso/bits.h  | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
  

Comments

Andy Shevchenko Jan. 27, 2023, 10:24 a.m. UTC | #1
On Mon, Nov 28, 2022 at 04:10:03PM +0200, Andy Shevchenko wrote:
> While the minimization is a good thing, the split added some
> inconsistency since BIT() and BIT_ULL() defined in the different
> files and confuses unprepared reader. Let's move BIT_ULL()
> to vdso/bits.h, so they will go together (as UL(), ULL() and
> so on).

Any comments on this?
  

Patch

diff --git a/include/linux/bits.h b/include/linux/bits.h
index 87d112650dfb..7c0cf5031abe 100644
--- a/include/linux/bits.h
+++ b/include/linux/bits.h
@@ -6,7 +6,6 @@ 
 #include <vdso/bits.h>
 #include <asm/bitsperlong.h>
 
-#define BIT_ULL(nr)		(ULL(1) << (nr))
 #define BIT_MASK(nr)		(UL(1) << ((nr) % BITS_PER_LONG))
 #define BIT_WORD(nr)		((nr) / BITS_PER_LONG)
 #define BIT_ULL_MASK(nr)	(ULL(1) << ((nr) % BITS_PER_LONG_LONG))
diff --git a/include/vdso/bits.h b/include/vdso/bits.h
index 6d005a1f5d94..388b212088ea 100644
--- a/include/vdso/bits.h
+++ b/include/vdso/bits.h
@@ -5,5 +5,6 @@ 
 #include <vdso/const.h>
 
 #define BIT(nr)			(UL(1) << (nr))
+#define BIT_ULL(nr)		(ULL(1) << (nr))
 
 #endif	/* __VDSO_BITS_H */