* [PATCH] scsi: snici: Remove dead code in snic_dr_clean_pending_req
@ 2023-10-19 8:30 Su Hui
2023-10-19 10:09 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Su Hui @ 2023-10-19 8:30 UTC (permalink / raw)
To: kartilak, sebaddel, jejb, martin.petersen
Cc: Su Hui, linux-scsi, linux-kernel, kernel-janitors
Value stored to 'ret' is never read, remove it to save space.
Signed-off-by: Su Hui <suhui@nfschina.com>
---
drivers/scsi/snic/snic_scsi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/snic/snic_scsi.c b/drivers/scsi/snic/snic_scsi.c
index c50ede326cc4..badd0d5640bc 100644
--- a/drivers/scsi/snic/snic_scsi.c
+++ b/drivers/scsi/snic/snic_scsi.c
@@ -1867,11 +1867,8 @@ snic_dr_clean_pending_req(struct snic *snic, struct scsi_cmnd *lr_sc)
schedule_timeout(msecs_to_jiffies(100));
/* Walk through all the cmds and check abts status. */
- if (snic_is_abts_pending(snic, lr_sc)) {
- ret = FAILED;
-
+ if (snic_is_abts_pending(snic, lr_sc))
goto clean_err;
- }
ret = 0;
SNIC_SCSI_DBG(snic->shost, "clean_pending_req: Success.\n");
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: snici: Remove dead code in snic_dr_clean_pending_req
2023-10-19 8:30 [PATCH] scsi: snici: Remove dead code in snic_dr_clean_pending_req Su Hui
@ 2023-10-19 10:09 ` Dan Carpenter
2023-10-20 1:52 ` Su Hui
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2023-10-19 10:09 UTC (permalink / raw)
To: Su Hui
Cc: kartilak, sebaddel, jejb, martin.petersen, linux-scsi,
linux-kernel, kernel-janitors
On Thu, Oct 19, 2023 at 04:30:27PM +0800, Su Hui wrote:
> Value stored to 'ret' is never read, remove it to save space.
>
> Signed-off-by: Su Hui <suhui@nfschina.com>
Could you do this a bit more thouroughly and remove all the
"ret = FAILED;" and "ret = 0;" assignments. Just "return FAILED;"
and "return 0;" directly.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: snici: Remove dead code in snic_dr_clean_pending_req
2023-10-19 10:09 ` Dan Carpenter
@ 2023-10-20 1:52 ` Su Hui
0 siblings, 0 replies; 3+ messages in thread
From: Su Hui @ 2023-10-20 1:52 UTC (permalink / raw)
To: Dan Carpenter
Cc: kartilak, sebaddel, jejb, martin.petersen, linux-scsi,
linux-kernel, kernel-janitors
On 2023/10/19 18:09, Dan Carpenter wrote:
> On Thu, Oct 19, 2023 at 04:30:27PM +0800, Su Hui wrote:
>> Value stored to 'ret' is never read, remove it to save space.
>>
>> Signed-off-by: Su Hui <suhui@nfschina.com>
> Could you do this a bit more thouroughly and remove all the
> "ret = FAILED;" and "ret = 0;" assignments. Just "return FAILED;"
> and "return 0;" directly.
Yes, this is better, thanks for your advice.
I will send v2 later.
Su Hui
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-20 1:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-19 8:30 [PATCH] scsi: snici: Remove dead code in snic_dr_clean_pending_req Su Hui
2023-10-19 10:09 ` Dan Carpenter
2023-10-20 1:52 ` Su Hui
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.