WSL2-Linux-Kernel/drivers/usb/gadget
David Brownell 01ee7d7032 USB: usb gadgets avoid le{16,32}_to_cpup()
It turns out that le16_to_cpup() and le32_to_cpup() aren't always safe
to call with pointers into packed structures, since those are inlined
functions and GCC may lose the "packed" attribute.  So those references
can become unaligned kernel accesses, which are evil on some hardware.

This patch updates uses of those routines in the gadget stack.  The
references into packed structures can just use leXX_to_cpu(*x), which
in most cases is more natural.  Some other uses in RNDIS, mostly in
debug code, were wrong in the first place; those use get_unaligned().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-06-08 16:24:30 -07:00
..
Kconfig [ARM] 4370/3: AT91: Support for Atmel AT91SAM9RL processors. 2007-05-11 21:07:54 +01:00
Makefile
at91_udc.c
at91_udc.h
config.c
dummy_hcd.c
epautoconf.c USB: usb gadgets avoid le{16,32}_to_cpup() 2007-06-08 16:24:30 -07:00
ether.c
file_storage.c
fsl_usb2_udc.c USB: fsl_usb2_udc: Fix UMTI_WIDE support and a compile warning 2007-05-22 23:45:49 -07:00
fsl_usb2_udc.h
gadget_chips.h
gmidi.c
goku_udc.c
goku_udc.h
inode.c USB: usb gadgets avoid le{16,32}_to_cpup() 2007-06-08 16:24:30 -07:00
lh7a40x_udc.c
lh7a40x_udc.h
ndis.h
net2280.c USB: usb gadgets avoid le{16,32}_to_cpup() 2007-06-08 16:24:30 -07:00
net2280.h
omap_udc.c USB: usb gadgets avoid le{16,32}_to_cpup() 2007-06-08 16:24:30 -07:00
omap_udc.h
pxa2xx_udc.c
pxa2xx_udc.h
rndis.c USB: usb gadgets avoid le{16,32}_to_cpup() 2007-06-08 16:24:30 -07:00
rndis.h
serial.c
usbstring.c
zero.c