Julia Lawall
9893e742a0
IB/core: Use kmemdup() instead of kmalloc()+memcpy()
...
Use kmemdup when some other buffer is immediately copied into the
allocated region.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/ )
// <smpl>
@@
expression from,to,size,flag;
statement S;
@@
- to = \(kmalloc\|kzalloc\)(size,flag);
+ to = kmemdup(from,size,flag);
if (to==NULL || ...) S
- memcpy(to, from, size);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2010-05-15 20:05:07 -07:00
..
2010-04-06 17:06:22 -04:00
2010-04-06 10:55:33 -04:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-04-09 10:05:33 -07:00
2010-04-09 11:50:29 -07:00
2010-03-30 22:02:32 +09:00
2010-04-08 09:46:20 +09:30
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-06 11:26:32 -08:00
2010-03-30 22:02:32 +09:00
2010-04-07 11:02:23 -07:00
2010-04-07 08:38:02 -07:00
2010-04-09 11:50:01 -07:00
2010-04-05 11:37:28 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-04-08 07:45:36 -07:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-05-15 20:05:07 -07:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-04-07 08:38:03 -07:00
2010-03-30 22:02:32 +09:00
2010-04-07 08:38:03 -07:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-04-05 11:37:28 +09:00
2010-04-07 08:38:03 -07:00
2010-03-30 22:02:32 +09:00
2010-04-06 08:34:06 -07:00
2010-03-30 22:02:32 +09:00
2010-04-05 11:37:28 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-04-05 11:37:28 +09:00
2010-04-06 13:03:52 -07:00
2010-04-07 08:38:03 -07:00
2010-04-06 17:06:22 -04:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-04-07 08:38:05 -07:00
2010-04-09 13:43:02 +02:00
2010-03-30 22:02:32 +09:00
2010-04-09 11:50:29 -07:00
2010-04-05 11:37:28 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-04-05 11:23:16 +09:00
2010-03-30 22:02:32 +09:00
2010-04-07 08:38:03 -07:00
2010-03-30 22:02:32 +09:00
2010-04-05 11:37:28 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-04-07 08:38:04 -07:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-04-06 09:56:40 -07:00
2010-03-30 22:02:32 +09:00
2010-03-06 11:26:28 -08:00
2010-03-08 20:21:04 +00:00