All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: move lower_48_bits() to block
@ 2022-03-27 17:33 kbusch
  2022-03-27 17:53 ` Linus Torvalds
  2022-04-12  1:18 ` Jens Axboe
  0 siblings, 2 replies; 5+ messages in thread
From: kbusch @ 2022-03-27 17:33 UTC (permalink / raw)
  To: linux-block, Linus Torvalds; +Cc: axboe, linux-kernel, Keith Busch

From: Keith Busch <kbusch@kernel.org>

The function is not generally applicable enough to be included in the core
kernel header. Move it to block since it's the only subsystem using it.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 include/linux/kernel.h | 9 ---------
 include/linux/t10-pi.h | 9 +++++++++
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 08ba5995aa8b..a890428bcc1a 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -63,15 +63,6 @@
 }					\
 )
 
-/**
- * lower_48_bits() - return bits 0-47 of a number
- * @n: the number we're accessing
- */
-static inline u64 lower_48_bits(u64 n)
-{
-	return n & ((1ull << 48) - 1);
-}
-
 /**
  * upper_32_bits - return bits 32-63 of a number
  * @n: the number we're accessing
diff --git a/include/linux/t10-pi.h b/include/linux/t10-pi.h
index a4b1af581f69..248f4ac95642 100644
--- a/include/linux/t10-pi.h
+++ b/include/linux/t10-pi.h
@@ -59,6 +59,15 @@ struct crc64_pi_tuple {
 	__u8   ref_tag[6];
 };
 
+/**
+ * lower_48_bits() - return bits 0-47 of a number
+ * @n: the number we're accessing
+ */
+static inline u64 lower_48_bits(u64 n)
+{
+	return n & ((1ull << 48) - 1);
+}
+
 static inline u64 ext_pi_ref_tag(struct request *rq)
 {
 	unsigned int shift = ilog2(queue_logical_block_size(rq->q));
-- 
2.17.2


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

* Re: [PATCH] block: move lower_48_bits() to block
  2022-03-27 17:33 [PATCH] block: move lower_48_bits() to block kbusch
@ 2022-03-27 17:53 ` Linus Torvalds
  2022-03-27 17:54   ` Linus Torvalds
  2022-03-27 19:16   ` Keith Busch
  2022-04-12  1:18 ` Jens Axboe
  1 sibling, 2 replies; 5+ messages in thread
From: Linus Torvalds @ 2022-03-27 17:53 UTC (permalink / raw)
  To: Keith Busch; +Cc: linux-block, Jens Axboe, Linux Kernel Mailing List

On Sun, Mar 27, 2022 at 10:33 AM <kbusch@kernel.org> wrote:
>
> The function is not generally applicable enough to be included in the core
> kernel header. Move it to block since it's the only subsystem using it.

Thanks.

Btw - replying on the list too, because at least last time you were on
the participants list, I got bounces about "mailbox too large".

WTH? Are you living in some hut in the wilderness in the good old
nineties using AOL for email?

Because admittedly the 21st century has been all that great so far,
but at least we got rid of mailbox limits.

               Linus

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

* Re: [PATCH] block: move lower_48_bits() to block
  2022-03-27 17:53 ` Linus Torvalds
@ 2022-03-27 17:54   ` Linus Torvalds
  2022-03-27 19:16   ` Keith Busch
  1 sibling, 0 replies; 5+ messages in thread
From: Linus Torvalds @ 2022-03-27 17:54 UTC (permalink / raw)
  To: Keith Busch; +Cc: linux-block, Jens Axboe, Linux Kernel Mailing List

On Sun, Mar 27, 2022 at 10:53 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Because admittedly the 21st century has been all that great so far,

 *hasn't

Duh.

             Linus

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

* Re: [PATCH] block: move lower_48_bits() to block
  2022-03-27 17:53 ` Linus Torvalds
  2022-03-27 17:54   ` Linus Torvalds
@ 2022-03-27 19:16   ` Keith Busch
  1 sibling, 0 replies; 5+ messages in thread
From: Keith Busch @ 2022-03-27 19:16 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-block, Jens Axboe, Linux Kernel Mailing List

On Sun, Mar 27, 2022 at 10:53:42AM -0700, Linus Torvalds wrote:
> On Sun, Mar 27, 2022 at 10:33 AM <kbusch@kernel.org> wrote:
> >
> > The function is not generally applicable enough to be included in the core
> > kernel header. Move it to block since it's the only subsystem using it.
> 
> Thanks.
> 
> Btw - replying on the list too, because at least last time you were on
> the participants list, I got bounces about "mailbox too large".
> 
> WTH? Are you living in some hut in the wilderness in the good old
> nineties using AOL for email?

Hah, my kernel.org had an entry pointing to a recently defunct
forwarding address. I think that was the problem, and should be fixed
now.

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

* Re: [PATCH] block: move lower_48_bits() to block
  2022-03-27 17:33 [PATCH] block: move lower_48_bits() to block kbusch
  2022-03-27 17:53 ` Linus Torvalds
@ 2022-04-12  1:18 ` Jens Axboe
  1 sibling, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2022-04-12  1:18 UTC (permalink / raw)
  To: kbusch, linux-block, torvalds; +Cc: linux-kernel

On Sun, 27 Mar 2022 11:33:16 -0600, kbusch@kernel.org wrote:
> From: Keith Busch <kbusch@kernel.org>
> 
> The function is not generally applicable enough to be included in the core
> kernel header. Move it to block since it's the only subsystem using it.
> 
> 

Applied, thanks!

[1/1] block: move lower_48_bits() to block
      commit: 868e6139c5212e7d9de8332806aacfeafb349320

Best regards,
-- 
Jens Axboe



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

end of thread, other threads:[~2022-04-12  1:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-27 17:33 [PATCH] block: move lower_48_bits() to block kbusch
2022-03-27 17:53 ` Linus Torvalds
2022-03-27 17:54   ` Linus Torvalds
2022-03-27 19:16   ` Keith Busch
2022-04-12  1:18 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.