usb: gadget: mtp: fix endianess bug
On big-endian builds, we get a warning about assigning the wrong half of a 16-bit integer into a byte: include/uapi/linux/byteorder/big_endian.h:22:35: warning: large integer implicitly truncated to unsigned type [-Woverflow] #define __constant_cpu_to_le16(x) ((__force __le16)___constant_swab16((x))) drivers/usb/gadget/function/f_mtp.c:322:13: note: in expansion of macro '__constant_cpu_to_le16' .bCount = __constant_cpu_to_le16(1), This removes the byte swap, which fixes the mistake and gets rid of the warning Link: https://kernelci.org/build/id/5910605e59b514c780b12d53/logs/ Fixes: 88fe0982 ("usb: gadget: mtp: Add MTP/PTP function") Signed-off-by:Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
Loading
Please register or sign in to comment