Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp4665877pxb; Mon, 28 Mar 2022 00:40:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfoGVDM3GStdxlCYP13GvUrZhRecxgB2VKW8DIWheuCcz2FSn50HGJ7YtEwgURBhX/88Bl X-Received: by 2002:a50:c3c6:0:b0:416:293f:1f42 with SMTP id i6-20020a50c3c6000000b00416293f1f42mr14332707edf.187.1648453217479; Mon, 28 Mar 2022 00:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648453217; cv=none; d=google.com; s=arc-20160816; b=vBtl/D9vkPiFH7OMYnkzoYGtKR917u1HSbR1dIQprhJbreGE5ZkWRxg0cspzOjaLmf dyzadCtpX3u6Gyu8cFVOGT+0GEQOmTUKq65vn1VxAHZFysPK4kaVwYOB0TRkBYUGZGww 3jxuczL0vho0OXNnESMymT56dBF4ye4QujUcvRGFeQWHfpkC3nBpWg3bvdqMsprR+MhW oqnfdze1dQcKc8DGXPpI2OroQfAoLenknd4sdtpyKrMa7lPqyWjZ7rEkwi7ZEvzw2RxU JqOi1848qsVGC4qt85lm6ICBj1g+pYE6zAmrfHAdI9IIusEWfontCXLYDVBLe4Klu1vZ 163A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=uWazpsFa38yrjGuu2Dr2OJR+Khspf5P3k5JWzgpQZUc=; b=ivP3ZaFmm+ynF4YU6sXSbJWu+kI8JLBzQmCu9+ojfQWuSVXvjjc8gtRjUtuwwdK1MK j20VNC2pwrp64bPZPs0Bpx9GD9qZuKijJa9BlSLLSkqvjpGU1sl/MNhwncqYj2IK9jvf G46KCGVpud7ZhL+L65+mAzJaDJffjyipmMlFBQjx2/gpoNu8O04E4UCMyBiLGTXOvvSV /t8FwoQ/sXbeDYW1tf5285e0Ui0Gpp/NIH3bQn3LCxrB78DFtTuFCtfsnFwOCOErd0S1 60rqG4m7AkAmfv4KvI/NAYK+tf+77kd25ugPnwsfDYFiIbWdJo+89rRSE0iii1RPyLaQ Wdcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DXqy42Cc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k25-20020a508ad9000000b00418c2b5bddbsi13360689edk.189.2022.03.28.00.39.52; Mon, 28 Mar 2022 00:40:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DXqy42Cc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236161AbiC0RfU (ORCPT + 99 others); Sun, 27 Mar 2022 13:35:20 -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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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)); -- 2.17.2