On Wed, Nov 27, 2013 at 9:26 PM, Dan Carpenter <dan.carpen...@oracle.com> wrote:
> On Wed, Nov 27, 2013 at 08:43:57PM +0800, ZHAO Gang wrote:
>> >> +                             /* Update the pointer */
>> >> +                             dma_addr += fbr->buffsize;
>> >
>> > Do the virt_addr update here as well.
>> >                                 virt_addr += fbr->buffsize;
>> >
>>
>> The inner loop's aim is to record bus address, update virt_addr here
>> seems a noise. I still feel it's good to update virt_addr outside the
>> inner loop.
>
> If you do it here, you can remove the comment and it is more clear
> and you can remove the comment explaining how the two pointers stay in
> sync.  Doing it here makes the code obvious.
>

I think I'm convinced, will do what you said.

> regards,
> dan carpenter
>
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to