Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-10 Thread Arnd Bergmann
On Monday 09 November 2015 23:49:54 Sinan Kaya wrote: > On 11/9/2015 8:48 AM, Timur Tabi wrote: > > Sinan Kaya wrote: > >>> > >>> And why kmalloc anyway? Why not leave it on the stack? > >>> > >>> char src[] = "hello world"; > >>> > >>> ? > >> > >> I need to call dma_map_single on this

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-10 Thread Arnd Bergmann
On Monday 09 November 2015 23:49:54 Sinan Kaya wrote: > On 11/9/2015 8:48 AM, Timur Tabi wrote: > > Sinan Kaya wrote: > >>> > >>> And why kmalloc anyway? Why not leave it on the stack? > >>> > >>> char src[] = "hello world"; > >>> > >>> ? > >> > >> I need to call dma_map_single on this

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-09 Thread Timur Tabi
Sinan Kaya wrote: OK. I did an internal code review before posting the patch. Nobody complained about iterator types. I am trying to find what goes as a good practice vs. what is personal style. I normally check for inappropriate usage of sized integers in my reviews, but I admit I'm

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-09 Thread Sinan Kaya
On 11/9/2015 4:26 AM, Andy Shevchenko wrote: On Mon, Nov 9, 2015 at 5:07 AM, Sinan Kaya wrote: On 11/8/2015 3:09 PM, Andy Shevchenko wrote: On Sun, Nov 8, 2015 at 6:52 AM, Sinan Kaya wrote: This patch adds supporting utility functions for selftest. The intention is to share the self

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-09 Thread Sinan Kaya
On 11/9/2015 8:48 AM, Timur Tabi wrote: Sinan Kaya wrote: And why kmalloc anyway? Why not leave it on the stack? char src[] = "hello world"; ? I need to call dma_map_single on this address to convert it to a DMA address. That's why. And you can't do that with an object that's on

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-09 Thread Timur Tabi
Sinan Kaya wrote: And why kmalloc anyway? Why not leave it on the stack? char src[] = "hello world"; ? I need to call dma_map_single on this address to convert it to a DMA address. That's why. And you can't do that with an object that's on the stack? -- Sent by an employee of the

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-09 Thread Andy Shevchenko
On Mon, Nov 9, 2015 at 5:07 AM, Sinan Kaya wrote: > > > On 11/8/2015 3:09 PM, Andy Shevchenko wrote: >> >> On Sun, Nov 8, 2015 at 6:52 AM, Sinan Kaya wrote: >>> >>> This patch adds supporting utility functions >>> for selftest. The intention is to share the self >>> test code between different

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-09 Thread Timur Tabi
Sinan Kaya wrote: And why kmalloc anyway? Why not leave it on the stack? char src[] = "hello world"; ? I need to call dma_map_single on this address to convert it to a DMA address. That's why. And you can't do that with an object that's on the stack? -- Sent by an employee of the

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-09 Thread Sinan Kaya
On 11/9/2015 8:48 AM, Timur Tabi wrote: Sinan Kaya wrote: And why kmalloc anyway? Why not leave it on the stack? char src[] = "hello world"; ? I need to call dma_map_single on this address to convert it to a DMA address. That's why. And you can't do that with an object that's on

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-09 Thread Sinan Kaya
On 11/9/2015 4:26 AM, Andy Shevchenko wrote: On Mon, Nov 9, 2015 at 5:07 AM, Sinan Kaya wrote: On 11/8/2015 3:09 PM, Andy Shevchenko wrote: On Sun, Nov 8, 2015 at 6:52 AM, Sinan Kaya wrote: This patch adds supporting utility functions for

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-09 Thread Timur Tabi
Sinan Kaya wrote: OK. I did an internal code review before posting the patch. Nobody complained about iterator types. I am trying to find what goes as a good practice vs. what is personal style. I normally check for inappropriate usage of sized integers in my reviews, but I admit I'm

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-09 Thread Andy Shevchenko
On Mon, Nov 9, 2015 at 5:07 AM, Sinan Kaya wrote: > > > On 11/8/2015 3:09 PM, Andy Shevchenko wrote: >> >> On Sun, Nov 8, 2015 at 6:52 AM, Sinan Kaya wrote: >>> >>> This patch adds supporting utility functions >>> for selftest. The intention is to

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-08 Thread Sinan Kaya
On 11/8/2015 3:09 PM, Andy Shevchenko wrote: On Sun, Nov 8, 2015 at 6:52 AM, Sinan Kaya wrote: This patch adds supporting utility functions for selftest. The intention is to share the self test code between different drivers. Supported test cases include: 1. dma_map_single 2. streaming DMA

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-08 Thread Sinan Kaya
On 11/8/2015 12:13 AM, Timur Tabi wrote: Sinan Kaya wrote: +static int dma_selftest_sg(struct dma_device *dmadev, +struct dma_chan *dma_chanptr, u64 size, +unsigned long flags) +{ +dma_addr_t src_dma, dest_dma, dest_dma_it; +u8 *dest_buf; +u32 i, j = 0; +

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-08 Thread Andy Shevchenko
On Sun, Nov 8, 2015 at 6:52 AM, Sinan Kaya wrote: > This patch adds supporting utility functions > for selftest. The intention is to share the self > test code between different drivers. > > Supported test cases include: > 1. dma_map_single > 2. streaming DMA > 3. coherent DMA > 4. scatter-gather

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-08 Thread Andy Shevchenko
On Sun, Nov 8, 2015 at 6:52 AM, Sinan Kaya wrote: > This patch adds supporting utility functions > for selftest. The intention is to share the self > test code between different drivers. > > Supported test cases include: > 1. dma_map_single > 2. streaming DMA > 3. coherent

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-08 Thread Sinan Kaya
On 11/8/2015 3:09 PM, Andy Shevchenko wrote: On Sun, Nov 8, 2015 at 6:52 AM, Sinan Kaya wrote: This patch adds supporting utility functions for selftest. The intention is to share the self test code between different drivers. Supported test cases include: 1.

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-08 Thread Sinan Kaya
On 11/8/2015 12:13 AM, Timur Tabi wrote: Sinan Kaya wrote: +static int dma_selftest_sg(struct dma_device *dmadev, +struct dma_chan *dma_chanptr, u64 size, +unsigned long flags) +{ +dma_addr_t src_dma, dest_dma, dest_dma_it; +u8 *dest_buf; +u32 i, j = 0; +

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-07 Thread Timur Tabi
Sinan Kaya wrote: +static int dma_selftest_sg(struct dma_device *dmadev, + struct dma_chan *dma_chanptr, u64 size, + unsigned long flags) +{ + dma_addr_t src_dma, dest_dma, dest_dma_it; + u8 *dest_buf; + u32 i, j = 0; +

[PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-07 Thread Sinan Kaya
This patch adds supporting utility functions for selftest. The intention is to share the self test code between different drivers. Supported test cases include: 1. dma_map_single 2. streaming DMA 3. coherent DMA 4. scatter-gather DMA Signed-off-by: Sinan Kaya --- drivers/dma/dmaengine.h |

[PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-07 Thread Sinan Kaya
This patch adds supporting utility functions for selftest. The intention is to share the self test code between different drivers. Supported test cases include: 1. dma_map_single 2. streaming DMA 3. coherent DMA 4. scatter-gather DMA Signed-off-by: Sinan Kaya ---

Re: [PATCH V3 3/4] dmaselftest: add memcpy selftest support functions

2015-11-07 Thread Timur Tabi
Sinan Kaya wrote: +static int dma_selftest_sg(struct dma_device *dmadev, + struct dma_chan *dma_chanptr, u64 size, + unsigned long flags) +{ + dma_addr_t src_dma, dest_dma, dest_dma_it; + u8 *dest_buf; + u32 i, j = 0; +