scsi: mpt3sas: Modify the comment and exception return value of function _base_get_event_diag_triggers()
Subsystems (2)
PATCH 1/1 scsi: mpt3sas: Modify the comment and exception return value of function _base_get_event_diag_triggers()
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.
--- drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/mpt3sas/mpt3sas_base.c +2 -1
@@ -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)) {
Signature · 1 line
1.8.3.1
PATCH 1/1 scsi: mpt3sas: Modify the comment and exception return value of function _base_get_event_diag_triggers()
Quoted 36 lines
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 <[email protected]>--- drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/scsi/mpt3sas/mpt3sas_base.c +3
-2@@ -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)) {