[PATCH] scsi: mpt3sas: Modify the comment and exception return value of function _base_get_event_diag_triggers()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For function _base_get_event_diag_triggers(), it has a return
value, but the description of the comment information is
incorrect. In addition, in the abnormal process, 0 should
not be returned, 0 means success, here an abnormal value
needs to be return, In order to retry after an exception
occurs, the setting returns to -EAGAIN, from code analysis,
it will not cause infinite retries.

Signed-off-by: Gu Mi <gumi@xxxxxxxxxxxxxxxxx>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 565339a..dabbab6 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -5025,7 +5025,7 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc,
  *				persistent pages
  * @ioc : per adapter object
  *
- * Return: nothing.
+ * Return: zero on success; otherwise return EAGAIN error codes
+ * asking the caller to retry.
  */
 static int
 _base_get_event_diag_triggers(struct MPT3SAS_ADAPTER *ioc)
@@ -5050,7 +5050,7 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc,
 		    ioc_err(ioc,
 		    "%s: Failed to get trigger pg2, ioc_status(0x%04x)\n",
 		   __func__, ioc_status));
-		return 0;
+		return -EAGAIN;
 	}
 
 	if (le16_to_cpu(trigger_pg2.NumMPIEventTrigger)) {
-- 
1.8.3.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux