Home
last modified time | relevance | path

Searched hist:"1892 bf90" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/usb/storage/
H A Dene_ub6250.c1892bf90 Thu Mar 17 15:39:10 CDT 2022 Alan Stern <stern@rowland.harvard.edu> USB: usb-storage: Fix use of bitfields for hardware data in ene_ub6250.c

The kernel test robot found a problem with the ene_ub6250 subdriver in
usb-storage: It uses structures containing bitfields to represent
hardware bits in its SD_STATUS, MS_STATUS, and SM_STATUS bytes. This
is not safe; it presumes a particular bit ordering and it assumes the
compiler will not insert padding, neither of which is guaranteed.

This patch fixes the problem by changing the structures to simple u8
values, with the bitfields replaced by bitmask constants.

CC: <stable@vger.kernel.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/YjOcbuU106UpJ/V8@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>