linux/drivers/usb/storage
Karina Yankevich d6429a3555 usb: storage: sddr55: fix sloppy typing in sddr55_{read|write}_data()
In sddr55_{read|write}_data(), the address variables are needlessly typed
as *unsigned long* -- which is 32-bit type on the 32-bit arches and 64-bit
type on the 64-bit arches; those variables' value should fit into just 3
command bytes and consists of 10-bit block # (or at least the max block #
seems to be 1023) and 4-/5-bit page # within a block, so 32-bit *unsigned*
*int* type should be more than enough...

Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.

[Sergey: rewrote the patch subject/description]

Signed-off-by: Karina Yankevich <k.yankevich@omp.ru>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/4c9485f2-0bfc-591b-bfe7-2059289b554e@omp.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-27 16:44:00 -08:00
..
alauda.c usb-storage: alauda: Fix uninit-value in alauda_check_media() 2023-08-04 14:57:16 +02:00
cypress_atacb.c scsi: core: Remove the cmd field from struct scsi_request 2022-03-01 22:21:49 -05:00
datafab.c
debug.c scsi: Remove drivers/scsi/scsi.h 2022-02-22 21:11:02 -05:00
debug.h
ene_ub6250.c USB: ene_usb6250: Allocate enough memory for full object 2023-02-06 13:46:42 +01:00
freecom.c
initializers.c
initializers.h
isd200.c usb-storage: isd200: fix initFunction error return 2022-04-21 19:02:42 +02:00
jumpshot.c
karma.c USB: storage: karma: fix rio_karma_init return 2022-04-21 19:03:26 +02:00
Kconfig
Makefile
onetouch.c usb: move from strlcpy with unused retval to strscpy 2022-08-19 11:08:54 +02:00
option_ms.c
option_ms.h
protocol.c
protocol.h
realtek_cr.c USB: storage: ums-realtek: fix error code in rts51x_read_mem() 2022-03-15 18:21:25 +01:00
scsiglue.c usb-storage: fix deadlock when a scsi command timeouts more than once 2023-05-13 18:53:03 +09:00
scsiglue.h
sddr09.c
sddr55.c usb: storage: sddr55: fix sloppy typing in sddr55_{read|write}_data() 2024-01-27 16:44:00 -08:00
shuttle_usbat.c usb-storage: shuttle_usbat: fix initFunction error return 2022-04-21 19:02:40 +02:00
sierra_ms.c usb: storage: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() 2023-12-15 13:55:30 +01:00
sierra_ms.h
transport.c USB: storage: Fix typo in comment 2022-06-21 16:39:42 +02:00
transport.h
uas-detect.h usb-storage,uas: make internal quirks flags 64bit 2023-10-21 12:45:14 +02:00
uas.c USB: core: Use device_driver directly in struct usb_driver and usb_device_driver 2024-01-04 16:06:32 +01:00
unusual_alauda.h
unusual_cypress.h usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility 2023-10-28 12:23:41 +02:00
unusual_datafab.h
unusual_devs.h usb-storage: Add quirk for incorrect WP on Kingston DT Ultimate 3.0 G3 2023-12-15 14:00:58 +01:00
unusual_ene_ub6250.h
unusual_freecom.h
unusual_isd200.h
unusual_jumpshot.h
unusual_karma.h
unusual_onetouch.h
unusual_realtek.h
unusual_sddr09.h
unusual_sddr55.h
unusual_uas.h uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS583Gen 2 2023-03-16 12:44:17 +01:00
unusual_usbat.h
usb.c usb-storage,uas: make internal quirks flags 64bit 2023-10-21 12:45:14 +02:00
usb.h usb-storage,uas: make internal quirks flags 64bit 2023-10-21 12:45:14 +02:00
usual-tables.c usb-storage,uas: make internal quirks flags 64bit 2023-10-21 12:45:14 +02:00