lkml.org 
[lkml]   [2012]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/6] dma: dw_dmac: check direction properly in dw_dma_cyclic_prep
Hi,

On Fri, Nov 16, 2012 at 05:30:21PM +0200, Andy Shevchenko wrote:
> On Fri, Nov 16, 2012 at 3:56 PM, Felipe Balbi <balbi@ti.com> wrote:
> > On Fri, Nov 16, 2012 at 03:59:16PM +0200, Andy Shevchenko wrote:
> >> dma_transfer_direction is a normal enum. It means we can't usually use the
> >> values as bit fields. Let's adjust this check and move it above the usage of
> >> the direction parameter.
> >
> > why above the direction parameter ? You need to explain why ? Is it just
> > because 'it looks nicer' or have you found another bug triggered by
> > that ?
>
> Many of current users do something like this:
>
> if (dir == MEM_TO_DEV)
> { ... }
> *else*
> { ... }
>
> that potentially could trigger the bug.

looks like this deserves to go into commit log ;-)

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-11-16 20:01    [W:0.055 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site