diff options
| author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-01-27 23:41:13 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-28 11:12:35 -0800 |
| commit | 9c18a05c454e8a6436352842e56fb1dd2760b13b (patch) | |
| tree | 2aff01603ec3ec8291d3ad3d6aafdcfb0c2f2932 /tools/perf/scripts/python | |
| parent | f0e0f8cffa73d5922b8e356c64d9238302763e07 (diff) | |
Staging: rtl8192u: Use put_unaligned_le16 in rtl819x_BAProc.c
This patch introduces the use of function put_unaligned_le16.
This is done using Coccinelle and semantic patch used is as follows:
@a@
typedef u16, __le16, uint16_t;
{u16,__le16,uint16_t} e16;
identifier tmp;
expression ptr;
expression y,e;
type T;
type T;
@@
- tmp = cpu_to_le16(y);
<+... when != tmp
(
- memcpy(ptr, (T)&tmp, \(2\|sizeof(u16)\|sizeof(__le16)\|sizeof(uint16_t)\|sizeof(e16)\));
+ put_unaligned_le16(y,ptr);
|
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le16(y,ptr);
)
...+>
? tmp = e
@@ type T; identifier a.tmp; @@
- T tmp;
...when != tmp
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
