Re: [PATCH 1/3] staging: et131x: simplify rx dma code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 27, 2013 at 9:26 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> 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
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux