From patchwork Sun Mar 27 17:33:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 12792882 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF6F1C4332F for ; Sun, 27 Mar 2022 17:34:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236157AbiC0RfT (ORCPT ); Sun, 27 Mar 2022 13:35:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233682AbiC0RfT (ORCPT ); Sun, 27 Mar 2022 13:35:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9772F4AE2F; Sun, 27 Mar 2022 10:33:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5159FB80D60; Sun, 27 Mar 2022 17:33:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7E1BC340EC; Sun, 27 Mar 2022 17:33:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648402418; bh=tjfrzTXUP10JWkL6oPjMYE35EKBK417x0WxwMGZ4myI=; h=From:To:Cc:Subject:Date:From; b=DXqy42CcUS1rjGd1vGkHK4CONo+k2b9lZTJdciTZ4xLOG9nN1PxSzXXPSGQSubAFF Kxl0lc8+TI8nmxSxbMui7RaOLBI5hdHNPS7YItyYQzkrZAK1B1AoDKmmJ4qVv9tRi4 KBDaiWkEA+U80GydpKtftOkbkry/aILqcGW/FYyfEtHEjbgbM0kVOdCMy2o8HCSVpo RHLOq3bV8iSItjDeCu7Y5MN4ZAslQF5LfHUo+utRBEDSyTs3GDXyawgCJV8zBOP2VW BLb2TfSDFSl9xaM5tFXaIsf1vOjklYKO1alKqSwi2mYqNRqXdIMEPE0DMk6pKMEF9N wVoKzoY8vAotA== From: kbusch@kernel.org To: linux-block@vger.kernel.org, Linus Torvalds Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, Keith Busch Subject: [PATCH] block: move lower_48_bits() to block Date: Sun, 27 Mar 2022 11:33:16 -0600 Message-Id: <20220327173316.315-1-kbusch@kernel.org> X-Mailer: git-send-email 2.17.2 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Keith Busch 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 Signed-off-by: Keith Busch --- 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));