Re: wan-cosa: Use memdup_user() rather than duplicating its implementation

2016-08-25 Thread Jan Kasprzak
SF Markus Elfring wrote: : > What about the GFP_DMA attribute, which your patch deletes? : > The buffer in question has to be ISA DMA-able. : : Thanks for your constructive feedback. : : Would you be interested in using a variant of the function "memdup_…" : with which the corresponding memor

Re: wan-cosa: Use memdup_user() rather than duplicating its implementation

2016-08-24 Thread SF Markus Elfring
> What about the GFP_DMA attribute, which your patch deletes? > The buffer in question has to be ISA DMA-able. Thanks for your constructive feedback. Would you be interested in using a variant of the function "memdup_…" with which the corresponding memory allocation option can be preserved?

Re: [PATCH] wan-cosa: Use memdup_user() rather than duplicating its implementation

2016-08-24 Thread Jan Kasprzak
Hello, SF Markus Elfring wrote: : From: Markus Elfring : Date: Sat, 20 Aug 2016 10:10:12 +0200 : : Reuse existing functionality from memdup_user() instead of keeping : duplicate source code. : : This issue was detected by using the Coccinelle software. What about the GFP_DMA at

Re: [PATCH] wan-cosa: Use memdup_user() rather than duplicating its implementation

2016-08-20 Thread David Miller
From: Christophe JAILLET Date: Sat, 20 Aug 2016 10:42:54 +0200 > Le 20/08/2016 à 10:25, SF Markus Elfring a écrit : >> @@ -875,16 +875,10 @@ static ssize_t cosa_write(struct file *file, >> if (count > COSA_MTU) >> count = COSA_MTU; >> >> -/* Allocate the buffer */ >> -

Re: [PATCH] wan-cosa: Use memdup_user() rather than duplicating its implementation

2016-08-20 Thread Christophe JAILLET
Le 20/08/2016 à 10:25, SF Markus Elfring a écrit : From: Markus Elfring Date: Sat, 20 Aug 2016 10:10:12 +0200 Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH] wan-cosa: Use memdup_user() rather than duplicating its implementation

2016-08-20 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 20 Aug 2016 10:10:12 +0200 Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wan/cosa.c | 12 +++- 1 file cha