* [PATCH] scsi: qla1280: fix warning comparing pointer to 0
@ 2021-03-15 3:49 Jiapeng Chong
2021-03-30 3:54 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-03-15 3:49 UTC (permalink / raw)
To: mdr; +Cc: jejb, martin.petersen, linux-scsi, linux-kernel, Jiapeng Chong
Fix the following coccicheck warning:
./drivers/scsi/qla1280.c:3057:37-38: WARNING comparing pointer to 0.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/scsi/qla1280.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 46de254..699da47 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -3054,7 +3054,7 @@ static void qla1280_mailbox_timeout(struct timer_list *t)
/* Check for empty slot in outstanding command list. */
for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS &&
- (ha->outstanding_cmds[cnt] != 0); cnt++) ;
+ ha->outstanding_cmds[cnt]; cnt++);
if (cnt >= MAX_OUTSTANDING_COMMANDS) {
status = SCSI_MLQUEUE_HOST_BUSY;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: qla1280: fix warning comparing pointer to 0
2021-03-15 3:49 [PATCH] scsi: qla1280: fix warning comparing pointer to 0 Jiapeng Chong
@ 2021-03-30 3:54 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-03-30 3:54 UTC (permalink / raw)
To: Jiapeng Chong, mdr; +Cc: Martin K . Petersen, jejb, linux-scsi, linux-kernel
On Mon, 15 Mar 2021 11:49:19 +0800, Jiapeng Chong wrote:
> Fix the following coccicheck warning:
>
> ./drivers/scsi/qla1280.c:3057:37-38: WARNING comparing pointer to 0.
Applied to 5.13/scsi-queue, thanks!
[1/1] scsi: qla1280: fix warning comparing pointer to 0
https://git.kernel.org/mkp/scsi/c/3070c72155c5
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-30 3:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 3:49 [PATCH] scsi: qla1280: fix warning comparing pointer to 0 Jiapeng Chong
2021-03-30 3:54 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.