From mboxrd@z Thu Jan 1 00:00:00 1970 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 71AB0C433FE for ; Tue, 22 Feb 2022 16:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233941AbiBVQ4o (ORCPT ); Tue, 22 Feb 2022 11:56:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230519AbiBVQ4n (ORCPT ); Tue, 22 Feb 2022 11:56:43 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D66616BF8C; Tue, 22 Feb 2022 08:56:18 -0800 (PST) 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 2A187B81B7C; Tue, 22 Feb 2022 16:56:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AEC3C340F1; Tue, 22 Feb 2022 16:56:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645548975; bh=XMbNZ4Yp3pB5CJy39MFuU7DbDGAoq3fnEia6T+9MnuE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hHZa6HWm+aag/twDn8vXkbA3dW4OCEZh7yQ/XwHoIWj/Srx/UQcevPHhwAukvOxDJ mBlnC2442ILKmdamqHIfIUyU6/oW+K2HWJKOYtUQpUe7ZDiCtMODNt+o6LspCMxnbU Jm5N0YkFuFoVEu+u5A4IEETNv7F2AxIg4sXnkGuPpywcKZewYHf9r6mrGJLfhrKgzq UuE9+yCTjGM2RbRReFJLQ9mu9qyBC9c0N77xeb06xg4ezId+2Hk+CPehprGB678O31 4/Lv+MkxKo9pEpgdGult5zkQj3XAQnXoGmSVaEdz9x2wzp0shXBRalF66xuy5qb7Wv kZlbQ8b5DsEYQ== Date: Tue, 22 Feb 2022 08:56:13 -0800 From: Keith Busch To: Christoph Hellwig Cc: Joe Perches , linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, axboe@kernel.dk, martin.petersen@oracle.com, colyli@suse.de, Bart Van Assche Subject: Re: [PATCHv3 04/10] linux/kernel: introduce lower_48_bits macro Message-ID: <20220222165613.GB1497257@dhcp-10-100-145-180.wdc.com> References: <20220222163144.1782447-1-kbusch@kernel.org> <20220222163144.1782447-5-kbusch@kernel.org> <66a0c8210cf9e7dfcc3fa2d247de1eebd5a8acb7.camel@perches.com> <20220222165045.GA14168@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220222165045.GA14168@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Feb 22, 2022 at 05:50:45PM +0100, Christoph Hellwig wrote: > On Tue, Feb 22, 2022 at 08:45:53AM -0800, Joe Perches wrote: > > On Tue, 2022-02-22 at 08:31 -0800, Keith Busch wrote: > > > +/** > > > + * lower_48_bits - return bits 0-47 of a number > > > + * @n: the number we're accessing > > > + */ > > > +#define lower_48_bits(n) ((u64)((n) & 0xffffffffffffull)) > > > > why not make this a static inline function? > > Agreed. Sure, that sounds good to me. I only did it this way to match the existing local convention, but I personally prefer the inline function too.