diff options
| author | Himanshu Jha <himanshujha199640@gmail.com> | 2017-10-17 17:14:30 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-01 16:51:09 +0100 |
| commit | b6565a07ca67f9b94fdc21ea1bc958236fcd7a71 (patch) | |
| tree | 2f617b0330721e1072f3a83d4c92b3303b1110b1 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | usb: wusbcore: wa-xfer: mark expected switch fall-through (diff) | |
| download | linux-b6565a07ca67f9b94fdc21ea1bc958236fcd7a71.tar.gz linux-b6565a07ca67f9b94fdc21ea1bc958236fcd7a71.zip | |
usb: wusbcore: Use put_unaligned_le32
Use put_unaligned_le32 rather than using byte ordering function and
memcpy which makes code clear.
Also, add the header file where it is declared.
Done using Coccinelle and semantic patch used is :
@ rule1 @
identifier tmp; expression ptr,x; type T;
@@
- tmp = cpu_to_le32(x);
<+... when != tmp
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le32(x,ptr);
...+>
@ depends on rule1 @
type j; identifier tmp;
@@
- j tmp;
...when != tmp
Signed-off-by: Himanshu Jha <himanshujha199640@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
