Re: [PATCH] tipc: Use kmemdup instead of kmalloc and memcpy

2016-06-27 Thread David Miller
From: Amitoj Kaur Chawla Date: Thu, 23 Jun 2016 10:19:37 +0530 > Replace calls to kmalloc followed by a memcpy with a direct call to > kmemdup. > > The Coccinelle semantic patch used to make this change is as follows: > @@ > expression from,to,size,flag; > statement S; > @@ > > - to = \(kmallo

Re: [PATCH] tipc: Use kmemdup instead of kmalloc and memcpy

2016-06-27 Thread Ying Xue
On 06/23/2016 12:49 PM, Amitoj Kaur Chawla wrote: > Replace calls to kmalloc followed by a memcpy with a direct call to > kmemdup. > > The Coccinelle semantic patch used to make this change is as follows: > @@ > expression from,to,size,flag; > statement S; > @@ > > - to = \(kmalloc\|kzalloc\)(si