Skip to content
  • Vaishali Thakkar's avatar
    usb: udc: Convert use of __constant_cpu_to_leXX to cpu_to_leXX · b5c03bff
    Vaishali Thakkar authored
    
    
    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: default avatarVaishali Thakkar <vthakkar1994@gmail.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
    b5c03bff