2022-02-17 22:40:29

by Jakob Koschel

[permalink] [raw]
Subject: [RFC PATCH 13/13] scsi: mpt3sas: comment about invalid usage of the list iterator

Since the list iteration never exists early, reply_q is guaranteed to
be an invalid variable and should not be used within
_base_process_reply_queue(). Since I'm not sure what this code was
supposed to do, I just marked this with this comment.

Signed-off-by: Jakob Koschel <[email protected]>
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 511726f92d9a..a6746e124226 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2013,7 +2013,7 @@ mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc, u8 poll)
}
}
if (poll)
- _base_process_reply_queue(reply_q);
+ _base_process_reply_queue(reply_q); // COMMENT
}

/**
--
2.25.1