From 9c18a05c454e8a6436352842e56fb1dd2760b13b Mon Sep 17 00:00:00 2001 From: Vaishali Thakkar Date: Tue, 27 Jan 2015 23:41:13 +0530 Subject: [PATCH] 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-format-patch failed