diff options
| author | Shreeya Patel <[email protected]> | 2020-03-13 16:54:51 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2020-03-17 14:00:45 +0100 |
| commit | d9e709d017f4645044738213714b762008bfc49c (patch) | |
| tree | b9821bddba0babb07903f630454282a087a286f4 /tools/perf/scripts/python/compaction-times.py | |
| parent | 76498b49f5bedbd5d184cceec05dde72749f9915 (diff) | |
Staging: wilc1000: cfg80211: Use kmemdup instead of kmalloc and memcpy
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\)(size,flag);
+ to = kmemdup(from,size,flag);
if (to==NULL || ...) S
- memcpy(to, from, size);
Signed-off-by: Shreeya Patel <[email protected]>
Reviewed-by: Stefano Brivio <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions