From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Andrew Murray <andrew.murray@arm.com>
Cc: Heiko Stuebner <heiko@sntech.de>,
linux-pci@vger.kernel.org, Shawn Lin <shawn.lin@rock-chips.com>,
Christoph Hellwig <hch@lst.de>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
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 <bhelgaas@google.com>,
linux-arm-kernel@lists.infradead.org, mbrugger@suse.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
jeremy.linton@arm.com, Tom Joseph <tjoseph@cadence.com>,
wahrenst@gmx.net, james.quinlan@broadcom.com,
Robin Murphy <robin.murphy@arm.com>,
"David S. Miller" <davem@davemloft.net>,
Tariq Toukan <tariqt@mellanox.com>
Subject: Re: [PATCH v2 1/6] linux/log2.h: Add roundup/rounddown_pow_two64() family of functions
Date: Tue, 19 Nov 2019 12:30:47 +0100 [thread overview]
Message-ID: <052d07fb4eb79b29dd58cab577d59bab6684329a.camel@suse.de> (raw)
In-Reply-To: <20191119111320.GP43905@e119886-lin.cambridge.arm.com>
[-- Attachment #1.1: Type: text/plain, Size: 758 bytes --]
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)
>
> To be consistent with other functions in the same file (__ilog_u64) you may
> want to rename this to __roundup_pow_of_two_u64.
Sounds good to me.
> Also do you know why u64 is used in some places and __u64 in others?
That's unwarranted, it should be __u64 everywhere.
> > +{
> > + return 1UL << fls64(n - 1);
>
> Does this need to be (and for the others):
>
> return 1ULL << fls64(n - 1);
>
> Notice that the PCI drivers you convert, all use 1ULL.
Noted
Regards,
Nicolas
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-11-19 11:30 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 15:59 [PATCH v2 0/6] Raspberry Pi 4 PCIe support Nicolas Saenz Julienne
2019-11-12 15:59 ` [PATCH v2 1/6] linux/log2.h: Add roundup/rounddown_pow_two64() family of functions Nicolas Saenz Julienne
2019-11-19 11:13 ` Andrew Murray
2019-11-19 11:30 ` Nicolas Saenz Julienne [this message]
2019-11-19 12:43 ` Nicolas Saenz Julienne
2019-11-19 16:28 ` Andrew Murray
2019-11-19 16:55 ` Jason Gunthorpe
2019-11-19 17:00 ` Andrew Murray
2019-11-12 15:59 ` [PATCH v2 2/6] dt-bindings: PCI: Add bindings for brcmstb's PCIe device Nicolas Saenz Julienne
2019-11-18 21:23 ` Rob Herring
2019-11-19 9:35 ` Nicolas Saenz Julienne
2019-11-19 11:17 ` Andrew Murray
2019-11-19 11:28 ` Nicolas Saenz Julienne
2019-11-12 15:59 ` [PATCH v2 3/6] ARM: dts: bcm2711: Enable PCIe controller Nicolas Saenz Julienne
2019-11-12 15:59 ` [PATCH v2 4/6] PCI: brcmstb: add Broadcom STB PCIe host controller driver Nicolas Saenz Julienne
2019-11-19 16:25 ` Andrew Murray
2019-11-19 18:20 ` Jeremy Linton
2019-11-20 20:24 ` Nicolas Saenz Julienne
2019-11-19 18:34 ` Florian Fainelli
2019-11-21 12:16 ` Andrew Murray
2019-11-20 19:53 ` Nicolas Saenz Julienne
2019-11-21 12:03 ` Andrew Murray
2019-11-21 12:59 ` Nicolas Saenz Julienne
2019-11-21 15:44 ` Andrew Murray
2019-11-21 21:07 ` Jim Quinlan
2019-11-22 14:59 ` Robin Murphy
2019-11-21 13:26 ` Nicolas Saenz Julienne
2019-11-21 15:46 ` Andrew Murray
2019-11-12 15:59 ` [PATCH v2 5/6] PCI: brcmstb: add MSI capability Nicolas Saenz Julienne
2019-11-13 13:49 ` Marc Zyngier
2019-11-21 15:38 ` Andrew Murray
2019-11-21 17:19 ` Nicolas Saenz Julienne
2019-11-19 11:18 ` [PATCH v2 0/6] Raspberry Pi 4 PCIe support Andrew Murray
2019-11-19 11:49 ` Nicolas Saenz Julienne
2019-11-21 12:18 ` Andrew Murray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=052d07fb4eb79b29dd58cab577d59bab6684329a.camel@suse.de \
--to=nsaenzjulienne@suse.de \
--cc=andrew.murray@arm.com \
--cc=bhelgaas@google.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hch@lst.de \
--cc=heiko@sntech.de \
--cc=iommu@lists.linux-foundation.org \
--cc=james.quinlan@broadcom.com \
--cc=jeremy.linton@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=m.szyprowski@samsung.com \
--cc=maz@kernel.org \
--cc=mbrugger@suse.com \
--cc=netdev@vger.kernel.org \
--cc=phil@raspberrypi.org \
--cc=robin.murphy@arm.com \
--cc=shawn.lin@rock-chips.com \
--cc=tariqt@mellanox.com \
--cc=tjoseph@cadence.com \
--cc=wahrenst@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).