lkml.org 
[lkml]   [2018]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 07/10] swiotlb: refactor swiotlb_map_page
    > > +	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@arm.com>

    I agree with Robin - it certainly makes it easier to read.

    With that small change:
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

    Thank you!

    >
    > > - return DIRECT_MAPPING_ERROR;
    > > + return dma_addr;
    > > }
    > > /*
    > >

    \
     
     \ /
      Last update: 2018-10-19 02:39    [W:5.523 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site