[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200903161252.GA24841@lst.de>
Date: Thu, 3 Sep 2020 18:12:52 +0200
From: Christoph Hellwig <hch@....de>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Nicolin Chen <nicoleotsuka@...il.com>,
Christoph Hellwig <hch@....de>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
"open list:LINUX FOR POWERPC PA SEMI PWRFICIENT"
<linuxppc-dev@...ts.ozlabs.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
rth@...ddle.net, ink@...assic.park.msu.ru,
Matt Turner <mattst88@...il.com>, linux-alpha@...r.kernel.org,
Tony Luck <tony.luck@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>, linux-ia64@...r.kernel.org,
schnelle@...ux.ibm.com, gerald.schaefer@...ux.ibm.com,
hca@...ux.ibm.com, Vasily Gorbik <gor@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
linux-s390@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
sparclinux@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
James Bottomley <James.Bottomley@...senpartnership.com>,
Helge Deller <deller@....de>, linux-parisc@...r.kernel.org
Subject: Re: [PATCH 1/2] dma-mapping: introduce
dma_get_seg_boundary_nr_pages()
On Thu, Sep 03, 2020 at 01:57:39PM +0300, Andy Shevchenko wrote:
> > +{
> > + if (!dev)
> > + return (U32_MAX >> page_shift) + 1;
> > + return (dma_get_seg_boundary(dev) >> page_shift) + 1;
>
> Can it be better to do something like
> unsigned long boundary = dev ? dma_get_seg_boundary(dev) : U32_MAX;
>
> return (boundary >> page_shift) + 1;
>
> ?
I don't really see what that would buy us.
Powered by blists - more mailing lists