linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] vdso/bits.h: Add BIT_ULL() for the sake of consistency
@ 2022-11-28 14:10 Andy Shevchenko
  2023-01-27 10:24 ` Andy Shevchenko
  2023-01-31 13:46 ` [tip: timers/core] " tip-bot2 for Andy Shevchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-11-28 14:10 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel
  Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino, Andrew Morton

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(-)

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 */
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] vdso/bits.h: Add BIT_ULL() for the sake of consistency
  2022-11-28 14:10 [PATCH v1 1/1] vdso/bits.h: Add BIT_ULL() for the sake of consistency Andy Shevchenko
@ 2023-01-27 10:24 ` Andy Shevchenko
  2023-01-31 13:46 ` [tip: timers/core] " tip-bot2 for Andy Shevchenko
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-01-27 10:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andy Lutomirski, Thomas Gleixner, Vincenzo Frascino, Andrew Morton

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?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: timers/core] vdso/bits.h: Add BIT_ULL() for the sake of consistency
  2022-11-28 14:10 [PATCH v1 1/1] vdso/bits.h: Add BIT_ULL() for the sake of consistency Andy Shevchenko
  2023-01-27 10:24 ` Andy Shevchenko
@ 2023-01-31 13:46 ` tip-bot2 for Andy Shevchenko
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Andy Shevchenko @ 2023-01-31 13:46 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Andy Shevchenko, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     cbdb1f163af2bb90d01be1f0263df1d8d5c9d9d3
Gitweb:        https://git.kernel.org/tip/cbdb1f163af2bb90d01be1f0263df1d8d5c9d9d3
Author:        Andy Shevchenko <andriy.shevchenko@linux.intel.com>
AuthorDate:    Mon, 28 Nov 2022 16:10:03 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 31 Jan 2023 14:42:10 +01:00

vdso/bits.h: Add BIT_ULL() for the sake of consistency

The minimization done in 3945ff37d2f4 ("linux/bits.h: Extract common header
for vDSO") was required to isolate the VDSO build from the larger kernel
header impact.

The split added some inconsistency since BIT() and BIT_ULL() are now
defined in the different files which confuses unprepared reader.

Move BIT_ULL() to vdso/bits.h. No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20221128141003.77929-1-andriy.shevchenko@linux.intel.com

---
 include/linux/bits.h | 1 -
 include/vdso/bits.h  | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/bits.h b/include/linux/bits.h
index 87d1126..7c0cf50 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 6d005a1..388b212 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 */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-31 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 14:10 [PATCH v1 1/1] vdso/bits.h: Add BIT_ULL() for the sake of consistency Andy Shevchenko
2023-01-27 10:24 ` Andy Shevchenko
2023-01-31 13:46 ` [tip: timers/core] " tip-bot2 for Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).