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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 A955FC432C0 for ; Tue, 3 Dec 2019 16:07:13 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.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 7F8902053B for ; Tue, 3 Dec 2019 16:07:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F8902053B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 88DBC81B17; Tue, 3 Dec 2019 16:07:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sKDuLVRdNHem; Tue, 3 Dec 2019 16:07:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 14FA985A54; Tue, 3 Dec 2019 16:06:55 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id F07F0C1798; Tue, 3 Dec 2019 16:06:54 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id B8FEDC087F for ; Tue, 3 Dec 2019 16:06:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A6E55203D1 for ; Tue, 3 Dec 2019 16:06:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hFWxgdCDrM+u for ; Tue, 3 Dec 2019 16:06:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by silver.osuosl.org (Postfix) with ESMTPS id 6CA2C20341 for ; Tue, 3 Dec 2019 16:06:50 +0000 (UTC) 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 AD9186A2F7; Tue, 3 Dec 2019 16:06:47 +0000 (UTC) Message-ID: Subject: Re: [PATCH v4 8/8] linux/log2.h: Use roundup/dow_pow_two() on 64bit calculations From: Nicolas Saenz Julienne To: Rob Herring Date: Tue, 03 Dec 2019 17:06:43 +0100 In-Reply-To: References: <20191203114743.1294-1-nsaenzjulienne@suse.de> <20191203114743.1294-9-nsaenzjulienne@suse.de> User-Agent: Evolution 3.34.1 MIME-Version: 1.0 Cc: Heiko Stuebner , PCI , Shawn Lin , Eric Anholt , Hanjun Guo , Frank Rowand , Christoph Hellwig , "open list:ARM/Rockchip SoC..." , linux-rdma@vger.kernel.org, Marc Zyngier , Phil Elwell , linux-acpi@vger.kernel.org, "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Len Brown , devicetree@vger.kernel.org, Florian Fainelli , "moderated list:BROADCOM BCM2835 ARM ARCHITECTURE" , Bjorn Helgaas , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Matthias Brugger , netdev , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" , Jeremy Linton , Linux IOMMU , Stefan Wahren , james.quinlan@broadcom.com, Sudeep Holla , Robin Murphy , "David S. Miller" , Tariq Toukan X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1693223338480754163==" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" --===============1693223338480754163== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-VHC+bPmpbRjqhnK2ykxw" --=-VHC+bPmpbRjqhnK2ykxw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Rob, On Tue, 2019-12-03 at 09:53 -0600, Rob Herring wrote: > On Tue, Dec 3, 2019 at 5:48 AM Nicolas Saenz Julienne > wrote: > > The function now is safe to use while expecting a 64bit value. Use it > > where relevant. >=20 > What was wrong with the existing code? This is missing some context. You're right, I'll update it. For most of files changed the benefit here is factoring out a common patter= n using the standard function roundup/down_pow_two() which now provides corre= ct 64bit results. As for of/device.c and arm64/iort.c it's more of a readability enhancement.= I consider it's easier to understand than the current calculation as it abstr= acts the math. > > Signed-off-by: Nicolas Saenz Julienne > > --- > > drivers/acpi/arm64/iort.c | 2 +- > > drivers/net/ethernet/mellanox/mlx4/en_clock.c | 3 ++- > > drivers/of/device.c | 3 ++- >=20 > In any case, >=20 > Acked-by: Rob Herring >=20 Thanks! Regards, Nicolas --=-VHC+bPmpbRjqhnK2ykxw 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/4FAl3miBMACgkQlfZmHno8 x/5s+Af/a2icSd66GHrsABoMtUfJXpQclSae81ThRP5Bfx6+mK4Ty4en3T+IxOK+ NPmneod0gjSfyqqQniFbEcmlKAd8wXyUnBCCi6urRvuqOWcw65h10DA3fQCivaOt NWn3FRWMlPZbBIAYr/XOcsdOOkbD+VaFE/PaBYmxU/rWaCLGMWpYYBhF/Vcm+ASd VPQ4g8AfxyGvQW9EgbmRTMC0k7kMP6qrpmgIjNWvUPyJ+8ytD2Zly2xvbVf9TqhX /PP/t19fWayTqhsg+B04K0aN0oriRqSFX44yvCOApKhLBSsF6Nyc40m2sreqKMYY 98kwrOrux/Fb3OeV/Wzdhhh8VhH+Sg== =4wmf -----END PGP SIGNATURE----- --=-VHC+bPmpbRjqhnK2ykxw-- --===============1693223338480754163== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu --===============1693223338480754163==--