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 25788C432C0 for ; Tue, 3 Dec 2019 16:06:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1D842073C for ; Tue, 3 Dec 2019 16:06:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726131AbfLCQGv (ORCPT ); Tue, 3 Dec 2019 11:06:51 -0500 Received: from mx2.suse.de ([195.135.220.15]:51528 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725848AbfLCQGv (ORCPT ); Tue, 3 Dec 2019 11:06:51 -0500 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 Cc: Andrew Murray , Marc Zyngier , "linux-kernel@vger.kernel.org" , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Tariq Toukan , Frank Rowand , Florian Fainelli , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Eric Anholt , Stefan Wahren , Shawn Lin , Heiko Stuebner , Christoph Hellwig , Marek Szyprowski , Robin Murphy , james.quinlan@broadcom.com, Matthias Brugger , Phil Elwell , Jeremy Linton , PCI , "moderated list:BROADCOM BCM2835 ARM ARCHITECTURE" , "Rafael J. Wysocki" , Len Brown , "David S. Miller" , Bjorn Helgaas , linux-acpi@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , netdev , linux-rdma@vger.kernel.org, devicetree@vger.kernel.org, "open list:ARM/Rockchip SoC..." , Linux IOMMU 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> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-VHC+bPmpbRjqhnK2ykxw" User-Agent: Evolution 3.34.1 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org --=-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-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Saenz Julienne Subject: Re: [PATCH v4 8/8] linux/log2.h: Use roundup/dow_pow_two() on 64bit calculations Date: Tue, 03 Dec 2019 17:06:43 +0100 Message-ID: References: <20191203114743.1294-1-nsaenzjulienne@suse.de> <20191203114743.1294-9-nsaenzjulienne@suse.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-VHC+bPmpbRjqhnK2ykxw" Return-path: In-Reply-To: Sender: netdev-owner@vger.kernel.org To: Rob Herring Cc: Andrew Murray , Marc Zyngier , "linux-kernel@vger.kernel.org" , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Tariq Toukan , Frank Rowand , Florian Fainelli , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Eric Anholt , Stefan Wahren , Shawn Lin , Heiko Stuebner , Christoph Hellwig , Marek Szyprowski , Robin Murphy , james.quinlan@broadcom.com, Matthias List-Id: linux-rockchip.vger.kernel.org --=-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-- 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==-- 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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 6671FC432C0 for ; Tue, 3 Dec 2019 16:07:09 +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 382522053B for ; Tue, 3 Dec 2019 16:07:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ahqoclux" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 382522053B 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=//FsZqW1eKXAXatTIioTc8IHp3RtuMllIv7t0p+Mjmc=; b=ahqocluxXHmJkSIIjB9ArIByM RmQRPVdKUeXXjMM+eIxcimVPkDpe1svtVTw3/UZLUhI3ujxspISX0PeWrmTGh8jXKFh7Li7q6BN6V c377GHzlDYVqn9MUbBjQlLAg19aD8jVrN0pKgvIyQx1eC0mw7PviI447OqYP1ENASwT5XakoOmNxk xr4y90ALTRvLgsDYriQKh/9KWJFdiDPqAOylADuIlVofs4GdmWAohwcVGmxCY8GYuK+SYn8xO7Vsu Pwqk75upxVXfLtWy8LhvdLqtOkOhAL+GRRSGX4Lnb47F/bsUXEYxlSw0P+uUsjf+2IWjUD2BoEJIB 7HU7bZW1w==; 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 1icAhW-0008En-M6; Tue, 03 Dec 2019 16:06:58 +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 1icAhN-0008D8-R6; Tue, 03 Dec 2019 16:06:56 +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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191203_080652_002580_030767FC X-CRM114-Status: GOOD ( 12.19 ) 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 , PCI , Shawn Lin , Eric Anholt , Hanjun Guo , Frank Rowand , Christoph Hellwig , Marek Szyprowski , Lorenzo Pieralisi , "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 , Andrew Murray , Robin Murphy , "David S. Miller" , Tariq Toukan Content-Type: multipart/mixed; boundary="===============1521433035471612154==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1521433035471612154== 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-- --===============1521433035471612154== 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 --===============1521433035471612154==--