diff options
author | Abhishek Tamboli <abhishektamboli9@gmail.com> | 2024-09-12 17:52:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-13 08:40:22 +0300 |
commit | 9027afa89bfe9e50e46714b72179761c67ebf4ad (patch) | |
tree | aa663e143322cce1d50ead385573cf22b08d80ec /drivers/usb/storage | |
parent | 7d01ef789bdcdd02ac42b98ae5b7f98310a0e3d2 (diff) | |
download | linux-9027afa89bfe9e50e46714b72179761c67ebf4ad.tar.xz |
usb: storage: ene_ub6250: Fix right shift warnings
Change bl_len from u16 to u32 to accommodate the necessary bit shifts.
Fix the following smatch warnings:
drivers/usb/storage/ene_ub6250.c:1509 ms_scsi_read_capacity() warn:
right shifting more than type allows 16 vs 24
drivers/usb/storage/ene_ub6250.c:1510 ms_scsi_read_capacity() warn:
right shifting more than type allows 16 vs 16
Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20240912145247.15544-1-abhishektamboli9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/ene_ub6250.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c index 73dd276ce59c..a4bfbecbf16c 100644 --- a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c @@ -1484,7 +1484,7 @@ static int ms_scsi_mode_sense(struct us_data *us, struct scsi_cmnd *srb) static int ms_scsi_read_capacity(struct us_data *us, struct scsi_cmnd *srb) { u32 bl_num; - u16 bl_len; + u32 bl_len; unsigned int offset = 0; unsigned char buf[8]; struct scatterlist *sg = NULL; |