lkml.org 
[lkml]   [2014]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5 0/2] i2c: add DMA support for freescale i2c driver
Date
On Thursday, July 24, 2014 at 05:36:34 AM, Yao Yuan wrote:
> Hi,
>
> Marek Vasut wrote:
> > On Wednesday, July 23, 2014 at 10:24:41 AM, Yuan Yao wrote:
> > > Changed in v5:
> > > - add "*chan_dev = dma->chan_using->device->dev" for reduce the call
> > > time.
> >
> > Did you check if the compiler generates different code ?
>
> Sorry, I didn't compare the assembly code. It's a subtle change.
> As you mentioned the "noodle" before.
>
> Old:
> dma_map_single(dma->chan_using->device->dev, ...);
> dma_mapping_error(dma->chan_using->device->dev, ...);
> dma_unmap_single(dma->chan_using->device->dev, ...);
>
> New:
> struct device *chan_dev = dma->chan_using->device->dev;
> dma_map_single(chan_dev, ...);
> dma_mapping_error(chan_dev, ...);
> dma_unmap_single(chan_dev, ...);

You should not use optimization and code cleanup interchangably. Thanks for
clarifying what this is.

Best regards,
Marek Vasut


\
 
 \ /
  Last update: 2014-07-24 07:42    [W:0.047 / U:8.760 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site