From: Abhishek Tamboli <abhishektamboli9@gmail.com>
To: stern@rowland.harvard.edu
Cc: gregkh@linuxfoundation.org, usb-storage@lists.one-eyed-alien.net,
linux-usb@vger.kernel.org, skhan@linuxfoundation.org,
dan.carpenter@linaro.org, rbmarliere@gmail.com,
linux-kernel-mentees@lists.linuxfoundation.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] usb: storage: ene_ub6250: Fix right shift warnings
Date: Mon, 29 Jul 2024 23:53:48 +0530 [thread overview]
Message-ID: <20240729182348.451436-1-abhishektamboli9@gmail.com> (raw)
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>
---
drivers/usb/storage/ene_ub6250.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c
index 97c66c0d91f4..ab6718dc874f 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;
--
2.34.1
next reply other threads:[~2024-07-29 18:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-29 18:23 Abhishek Tamboli [this message]
2024-07-29 18:34 ` [PATCH] usb: storage: ene_ub6250: Fix right shift warnings Alan Stern
2024-07-30 7:09 ` Oliver Neukum
2024-07-30 17:56 ` Abhishek Tamboli
2024-07-31 9:15 ` Oliver Neukum
2024-07-31 14:04 ` Alan Stern
2024-07-31 18:04 ` Abhishek Tamboli
2024-07-31 18:19 ` Alan Stern
2024-07-31 19:18 ` Abhishek Tamboli
2024-08-01 6:54 ` Oliver Neukum
2024-08-01 14:51 ` Alan Stern
2024-09-12 0:45 ` Abhishek Tamboli
2024-09-12 1:24 ` Alan Stern
2024-09-12 5:06 ` Greg KH
2024-09-12 14:50 ` Abhishek Tamboli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240729182348.451436-1-abhishektamboli9@gmail.com \
--to=abhishektamboli9@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rbmarliere@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=stern@rowland.harvard.edu \
--cc=usb-storage@lists.one-eyed-alien.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox