Blob Blame History Raw
From: James Smart <james.smart@broadcom.com>
Date: Tue, 20 Oct 2020 13:27:15 -0700
Subject: scsi: lpfc: Fix duplicate wq_create_version check
Patch-mainline: v5.11-rc1
Git-commit: f5201f87ccafd8d80283c87490bbdf78f8a026bf
References: bsc#1164780

During code reviews duplicate code sections were found to determine the WQ
Create version.  The duplication was potentially overriding logic that
validated page size.

Link: https://lore.kernel.org/r/20201020202719.54726-6-james.smart@broadcom.com
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
 drivers/scsi/lpfc/lpfc_sli.c |    6 ------
 1 file changed, 6 deletions(-)

--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -15786,12 +15786,6 @@ lpfc_wq_create(struct lpfc_hba *phba, st
 	else
 		wq_create_version = LPFC_Q_CREATE_VERSION_0;
 
-
-	if (phba->sli4_hba.pc_sli4_params.wqsize & LPFC_WQ_SZ128_SUPPORT)
-		wq_create_version = LPFC_Q_CREATE_VERSION_1;
-	else
-		wq_create_version = LPFC_Q_CREATE_VERSION_0;
-
 	switch (wq_create_version) {
 	case LPFC_Q_CREATE_VERSION_1:
 		bf_set(lpfc_mbx_wq_create_wqe_count, &wq_create->u.request_1,