Skip to contentSkip to conversation

isci: style: remove the unneeded variable: "status".

PATCH Applied YANG LI 2 participants 2 messages Dec 30, 2020 – Jan 15, 2021

Subsystems (2)
lore
Share & tools
lore

YANG LI

author
#0 lore raw

PATCH 1/1 isci: style: remove the unneeded variable: "status".

The variable 'status' is being initialized with SCI_SUCCESS and never update later with a new value. The initialization is redundant and can be removed.

---
 drivers/scsi/isci/request.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/isci/request.c +1 -3
index 6e08179..bee1685 100644
@@ -2103,8 +2103,6 @@ enum sci_status
 static enum sci_status stp_request_udma_await_tc_event(struct isci_request *ireq,
 						       u32 completion_code)
 {
-	enum sci_status status = SCI_SUCCESS;
-
 	switch (SCU_GET_COMPLETION_TL_STATUS(completion_code)) {
 	case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_GOOD):
 		ireq->scu_status = SCU_TASK_DONE_GOOD;
@@ -2148,7 +2146,7 @@ static enum sci_status stp_request_udma_await_tc_event(struct isci_request *ireq
 		break;
 	}
 
-	return status;
+	return SCI_SUCCESS;
 }
 
 static enum sci_status atapi_raw_completion(struct isci_request *ireq, u32 completion_code,
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 3 lines · YANG LI

The variable 'status' is being initialized with SCI_SUCCESS and never update later with a new value. The initialization is redundant and can be removed.

Applied to 5.12/scsi-queue, thanks!

[1/1] isci: style: remove the unneeded variable: "status".

      https://git.kernel.org/mkp/scsi/c/dc0bfdb563c8
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering