diff options
author | 2015-01-27 23:41:13 +0530 | |
---|---|---|
committer | 2015-01-28 11:12:35 -0800 | |
commit | 9c18a05c454e8a6436352842e56fb1dd2760b13b (patch) | |
tree | 2aff01603ec3ec8291d3ad3d6aafdcfb0c2f2932 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | staging: rtl8192u: Refactor heavy nesting (diff) | |
download | linux-dev-9c18a05c454e8a6436352842e56fb1dd2760b13b.tar.xz linux-dev-9c18a05c454e8a6436352842e56fb1dd2760b13b.zip |
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/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions