Skip to content

Commit 9027afa

Browse files
Abhishek-Tamboli9gregkh
authored andcommitted
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 <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7d01ef7 commit 9027afa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/storage/ene_ub6250.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ static int ms_scsi_mode_sense(struct us_data *us, struct scsi_cmnd *srb)
14841484
static int ms_scsi_read_capacity(struct us_data *us, struct scsi_cmnd *srb)
14851485
{
14861486
u32 bl_num;
1487-
u16 bl_len;
1487+
u32 bl_len;
14881488
unsigned int offset = 0;
14891489
unsigned char buf[8];
14901490
struct scatterlist *sg = NULL;

0 commit comments

Comments
 (0)