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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99B9FC432C0 for ; Tue, 19 Nov 2019 12:43:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71CF1222B3 for ; Tue, 19 Nov 2019 12:43:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="F0EYrm9P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71CF1222B3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Date:To:From:Subject:Message-ID:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TBeag3eHWvHa1nJpeT98l5cfb4wXBZK/rhUTzZ1aTFg=; b=F0EYrm9PofaLWm//BTf3Ccpvz GOctLy/ztcrdrHFajmAg8Aq/MExRmhN7e9c/Eio5/YawqN3Z1wA5AvgfBhbJFd5HlORt8626QW5Su 74Cq8G3H3GMJU6GmhjgeIHKb7jQ3O6MES66lI+ZkDffG7wtrpOQ5cCo0nk0XYqmzPvM9UYuhaVkCj am9y+XleQHV2eNpcASPNkyfgpuLFeo7dwpdsz2erznNz7oyyuwJrot1SVYOpVKoa0RnfB3H6ElO05 QiLMVEyb+QXtntdlGabc9Sh8ft7uruHNH18T+uT12tO8HOHhkCMp4Z9VzZxp2w1vtfaACmMV5WdhD vHG+Z8nhQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iX2rG-0005kh-RN; Tue, 19 Nov 2019 12:43:50 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iX2rC-0005jg-Vr; Tue, 19 Nov 2019 12:43:48 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 61E29AA35; Tue, 19 Nov 2019 12:43:43 +0000 (UTC) Message-ID: <56cbba61d92f9bc7d0a33c1de379bcd5cf411cb8.camel@suse.de> Subject: Re: [PATCH v2 1/6] linux/log2.h: Add roundup/rounddown_pow_two64() family of functions From: Nicolas Saenz Julienne To: Andrew Murray Date: Tue, 19 Nov 2019 13:43:39 +0100 In-Reply-To: <052d07fb4eb79b29dd58cab577d59bab6684329a.camel@suse.de> References: <20191112155926.16476-1-nsaenzjulienne@suse.de> <20191112155926.16476-2-nsaenzjulienne@suse.de> <20191119111320.GP43905@e119886-lin.cambridge.arm.com> <052d07fb4eb79b29dd58cab577d59bab6684329a.camel@suse.de> User-Agent: Evolution 3.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191119_044347_171456_B44BA640 X-CRM114-Status: GOOD ( 15.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , Christoph Hellwig , Marek Szyprowski , Lorenzo Pieralisi , linux-rdma@vger.kernel.org, maz@kernel.org, phil@raspberrypi.org, iommu@lists.linux-foundation.org, linux-rockchip@lists.infradead.org, f.fainelli@gmail.com, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, mbrugger@suse.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, Tom Joseph , wahrenst@gmx.net, james.quinlan@broadcom.com, Robin Murphy , "David S. Miller" , Tariq Toukan Content-Type: multipart/mixed; boundary="===============8940781660591022608==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8940781660591022608== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-PEkTPRiOa1AqhiKRErKs" --=-PEkTPRiOa1AqhiKRErKs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2019-11-19 at 12:30 +0100, Nicolas Saenz Julienne wrote: > Hi Andrew, thanks for the review. > > > +/** > > > + * __roundup_pow_of_two64() - round 64bit value up to nearest power = of > > > two > > > + * @n: value to round up > > > + */ > > > +static inline __attribute__((const)) __u64 __roundup_pow_of_two64(__= u64 > > > n) > >=20 > > To be consistent with other functions in the same file (__ilog_u64) you= may > > want to rename this to __roundup_pow_of_two_u64. >=20 > Sounds good to me. >=20 > > Also do you know why u64 is used in some places and __u64 in others? >=20 > That's unwarranted, it should be __u64 everywhere. Sorry, now that I look deeper into it, it should be u64. > > > +{ > > > + return 1UL << fls64(n - 1); > >=20 > > Does this need to be (and for the others): > >=20 > > return 1ULL << fls64(n - 1); > >=20 > > Notice that the PCI drivers you convert, all use 1ULL. >=20 > Noted >=20 > Regards, > Nicolas >=20 --=-PEkTPRiOa1AqhiKRErKs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl3T43sACgkQlfZmHno8 x/7LuAf/c4Ft9xBoQ5DrEpF3NZnrHpWnbCYGBZ5Q00PjCEwaMwf7zN1jspazlRC1 8u+n3yELpEHEhnu5CArHUsydAcMXpcZ05JTf+ii7TGVQfZmFY/iII/4C0WEQPif5 T19cDHz4f+qS+CVqpEWBvFt5YBDXfVst7ezSwZSRfRYNVjYMG4d2zbTRqSlVmOT5 6FKyeFGOK+lGpYpAaAu09PG7IFFqMEae3x6TkHfO2cfzUzy88FyOVNZ8G4Oucvhe 90OcIAUpPGgfX+Q2mQPBsITErw/o+Z4qY6t/kwwLcj9YjCFjh9MuwoDpS24a8Tmq 5XWFnFRetCT6rYY15K2BujP0/VQBBQ== =sJh7 -----END PGP SIGNATURE----- --=-PEkTPRiOa1AqhiKRErKs-- --===============8940781660591022608== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8940781660591022608==--