From: cgel.zte@gmail.com
To: martin.petersen@oracle.com
Cc: sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com,
suganath-prabu.subramani@broadcom.com, jejb@linux.ibm.com,
MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org,
ye xingchen <ye.xingchen@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH linux-next] scsi: mpt3sas: Remove the unneeded result variable
Date: Fri, 26 Aug 2022 07:25:20 +0000 [thread overview]
Message-ID: <20220826072520.252845-1-ye.xingchen@zte.com.cn> (raw)
From: ye xingchen <ye.xingchen@zte.com.cn>
Return the value _base_diag_reset() directly instead of storing it in
another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 565339a0811d..26f5897a5c7c 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -7170,7 +7170,6 @@ static int
_base_wait_for_iocstate(struct MPT3SAS_ADAPTER *ioc, int timeout)
{
u32 ioc_state;
- int rc;
dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__));
@@ -7216,8 +7215,7 @@ _base_wait_for_iocstate(struct MPT3SAS_ADAPTER *ioc, int timeout)
}
issue_diag_reset:
- rc = _base_diag_reset(ioc);
- return rc;
+ return _base_diag_reset(ioc);
}
/**
@@ -7879,7 +7877,6 @@ int
mpt3sas_base_make_ioc_ready(struct MPT3SAS_ADAPTER *ioc, enum reset_type type)
{
u32 ioc_state;
- int rc;
int count;
dinitprintk(ioc, ioc_info(ioc, "%s\n", __func__));
@@ -7948,8 +7945,7 @@ mpt3sas_base_make_ioc_ready(struct MPT3SAS_ADAPTER *ioc, enum reset_type type)
}
issue_diag_reset:
- rc = _base_diag_reset(ioc);
- return rc;
+ return _base_diag_reset(ioc);
}
/**
--
2.25.1
reply other threads:[~2022-08-26 7:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220826072520.252845-1-ye.xingchen@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
--cc=ye.xingchen@zte.com.cn \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).