]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
usb: udc: Convert use of __constant_cpu_to_leXX to cpu_to_leXX
authorVaishali Thakkar <vthakkar1994@gmail.com>
Wed, 10 Jun 2015 10:34:25 +0000 (16:04 +0530)
committerFelipe Balbi <balbi@ti.com>
Wed, 29 Jul 2015 14:59:18 +0000 (09:59 -0500)
commitb5c03bffa67727697252e913f64703e3404867ae
tree519582908c496c98e6d767fc58e72889e0651d9a
parentad4676ab58ae38e5597a2d6bc0d12e9b5e0b0d18
usb: udc: Convert use of __constant_cpu_to_leXX to cpu_to_leXX

In big endian cases, the macro cpu_to_le{16,32} unfolds to __swab{16,32}
which provides special case for constants. In little endian cases,
__constant_cpu_to_le{16,32} and cpu_to_le{16,32} expand directly to
the same expression. So, replace __constant_cpu_to_le{16,32} with
cpu_to_le{16,32} with the goal of getting rid of the definition of
__constant_cpu_to_le{16,32} completely.

The semantic patch that performs this transformation is as follows:

@@expression x;@@

(
- __constant_cpu_to_le16(x)
+ cpu_to_le16(x)
|
- __constant_cpu_to_le32(x)
+ cpu_to_le32(x)
)

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc/net2272.c
drivers/usb/gadget/udc/pch_udc.c