[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181019134629.GE54336@Konrads-MacBook-Pro.local>
Date: Fri, 19 Oct 2018 09:46:30 -0400
From: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: Robin Murphy <robin.murphy@....com>,
Will Deacon <will.deacon@....com>,
Catalin Marinas <catalin.marinas@....com>,
linux-arm-kernel@...ts.infradead.org,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/10] swiotlb: refactor swiotlb_map_page
On Fri, Oct 19, 2018 at 08:52:58AM +0200, Christoph Hellwig wrote:
> On Thu, Oct 18, 2018 at 08:37:15PM -0400, Konrad Rzeszutek Wilk wrote:
> > > > + if (!dma_capable(dev, dma_addr, size) ||
> > > > + swiotlb_force == SWIOTLB_FORCE) {
> > > > + trace_swiotlb_bounced(dev, dma_addr, size, swiotlb_force);
> > > > + dma_addr = swiotlb_bounce_page(dev, &phys, size, dir, attrs);
> > > > + }
> > >
> > > FWIW I prefer the inverse condition and early return of the original code
> > > here, which also then allows a tail-call to swiotlb_bounce_page() (and saves
> > > a couple of lines), but it's no biggie.
> > >
> > > Reviewed-by: Robin Murphy <robin.murphy@....com>
> >
> > I agree with Robin - it certainly makes it easier to read.
> >
> > With that small change:
> > Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
>
> So I did this edit, and in this patch it does indeed look much cleaner.
> But in patch 9 we introduce the cache maintainance, and have to invert
> the condition again if we don't want a goto mess:
Right. In which case please leave this patch as it is. And please
plaster the Reviewed-by on the patch. Thank you!
Powered by blists - more mailing lists