From: Vaishali Thakkar Date: Tue, 27 Jan 2015 18:11:13 +0000 (+0530) Subject: Staging: rtl8192u: Use put_unaligned_le16 in rtl819x_BAProc.c X-Git-Tag: fixes-v4.0-rc1~99^2~129 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c18a05c454e8a6436352842e56fb1dd2760b13b;p=pandora-kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed