Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebaf9418 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Amit Pundir
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 8a695524
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment