* [PATCH] scsi: ses: Fix unsigned comparison with less than zero
@ 2021-09-24 9:51 Jiapeng Chong
2021-09-29 4:19 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-09-24 9:51 UTC (permalink / raw)
To: jejb; +Cc: martin.petersen, linux-scsi, linux-kernel, Jiapeng Chong
Fix the following coccicheck warning:
./drivers/scsi/ses.c:137:10-16: WARNING: Unsigned expression compared
with zero: result > 0.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/scsi/ses.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 43e6822..0a1734f 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -118,7 +118,7 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code,
static int ses_send_diag(struct scsi_device *sdev, int page_code,
void *buf, int bufflen)
{
- u32 result;
+ int result;
unsigned char cmd[] = {
SEND_DIAGNOSTIC,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: ses: Fix unsigned comparison with less than zero
2021-09-24 9:51 [PATCH] scsi: ses: Fix unsigned comparison with less than zero Jiapeng Chong
@ 2021-09-29 4:19 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-09-29 4:19 UTC (permalink / raw)
To: jejb, Jiapeng Chong; +Cc: Martin K . Petersen, linux-kernel, linux-scsi
On Fri, 24 Sep 2021 17:51:53 +0800, Jiapeng Chong wrote:
> Fix the following coccicheck warning:
>
> ./drivers/scsi/ses.c:137:10-16: WARNING: Unsigned expression compared
> with zero: result > 0.
>
>
Applied to 5.15/scsi-fixes, thanks!
[1/1] scsi: ses: Fix unsigned comparison with less than zero
https://git.kernel.org/mkp/scsi/c/dd689ed5aa90
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-29 4:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 9:51 [PATCH] scsi: ses: Fix unsigned comparison with less than zero Jiapeng Chong
2021-09-29 4:19 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).