[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56cbba61d92f9bc7d0a33c1de379bcd5cf411cb8.camel@suse.de>
Date: Tue, 19 Nov 2019 13:43:39 +0100
From: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To: Andrew Murray <andrew.murray@....com>
Cc: Heiko Stuebner <heiko@...ech.de>, linux-pci@...r.kernel.org,
Shawn Lin <shawn.lin@...k-chips.com>,
Christoph Hellwig <hch@....de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
linux-rdma@...r.kernel.org, maz@...nel.org, phil@...pberrypi.org,
iommu@...ts.linux-foundation.org,
linux-rockchip@...ts.infradead.org, f.fainelli@...il.com,
Bjorn Helgaas <bhelgaas@...gle.com>,
linux-arm-kernel@...ts.infradead.org, mbrugger@...e.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
jeremy.linton@....com, Tom Joseph <tjoseph@...ence.com>,
wahrenst@....net, james.quinlan@...adcom.com,
Robin Murphy <robin.murphy@....com>,
"David S. Miller" <davem@...emloft.net>,
Tariq Toukan <tariqt@...lanox.com>
Subject: Re: [PATCH v2 1/6] linux/log2.h: Add roundup/rounddown_pow_two64()
family of functions
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)
> >
> > 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.
Sorry, now that I look deeper into it, it should be u64.
> > > +{
> > > + 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
>
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists