summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_gs.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-08-09 05:02:16 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2019-08-13 03:34:09 +0200
commitc6e58160a2c0caf6a8079134f0807bef0ecec6b8 (patch)
treef8e62d3d0465bd76fc310b28bb5756213e7c652f /drivers/scsi/qla2xxx/qla_gs.c
parentscsi: qla2xxx: Inline the qla2x00_fcport_event_handler() function (diff)
downloadlinux-c6e58160a2c0caf6a8079134f0807bef0ecec6b8.tar.xz
linux-c6e58160a2c0caf6a8079134f0807bef0ecec6b8.zip
scsi: qla2xxx: Introduce qla2x00_els_dcmd2_free()
This patch reduces code duplication. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_gs.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 0e1df8232c75..bf8b30c4827c 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -3119,17 +3119,7 @@ void qla24xx_sp_unmap(scsi_qla_host_t *vha, srb_t *sp)
switch (sp->type) {
case SRB_ELS_DCMD:
- if (c->u.els_plogi.els_plogi_pyld)
- dma_free_coherent(&vha->hw->pdev->dev,
- c->u.els_plogi.tx_size,
- c->u.els_plogi.els_plogi_pyld,
- c->u.els_plogi.els_plogi_pyld_dma);
-
- if (c->u.els_plogi.els_resp_pyld)
- dma_free_coherent(&vha->hw->pdev->dev,
- c->u.els_plogi.rx_size,
- c->u.els_plogi.els_resp_pyld,
- c->u.els_plogi.els_resp_pyld_dma);
+ qla2x00_els_dcmd2_free(vha, &c->u.els_plogi);
break;
case SRB_CT_PTHRU_CMD:
default: