Commit 0ea85b50 authored by Joe Perches's avatar Joe Perches Committed by Christoph Hellwig

qla2xxx: Use dma_zalloc_coherent

Use the zeroing function instead of dma_alloc_coherent & memset(,0,)
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 44416c42
...@@ -1526,7 +1526,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) ...@@ -1526,7 +1526,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
FCE_SIZE, ha->fce, ha->fce_dma); FCE_SIZE, ha->fce, ha->fce_dma);
/* Allocate memory for Fibre Channel Event Buffer. */ /* Allocate memory for Fibre Channel Event Buffer. */
tc = dma_alloc_coherent(&ha->pdev->dev, FCE_SIZE, &tc_dma, tc = dma_zalloc_coherent(&ha->pdev->dev, FCE_SIZE, &tc_dma,
GFP_KERNEL); GFP_KERNEL);
if (!tc) { if (!tc) {
ql_log(ql_log_warn, vha, 0x00be, ql_log(ql_log_warn, vha, 0x00be,
...@@ -1535,7 +1535,6 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) ...@@ -1535,7 +1535,6 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
goto try_eft; goto try_eft;
} }
memset(tc, 0, FCE_SIZE);
rval = qla2x00_enable_fce_trace(vha, tc_dma, FCE_NUM_BUFFERS, rval = qla2x00_enable_fce_trace(vha, tc_dma, FCE_NUM_BUFFERS,
ha->fce_mb, &ha->fce_bufs); ha->fce_mb, &ha->fce_bufs);
if (rval) { if (rval) {
...@@ -1560,7 +1559,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) ...@@ -1560,7 +1559,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
EFT_SIZE, ha->eft, ha->eft_dma); EFT_SIZE, ha->eft, ha->eft_dma);
/* Allocate memory for Extended Trace Buffer. */ /* Allocate memory for Extended Trace Buffer. */
tc = dma_alloc_coherent(&ha->pdev->dev, EFT_SIZE, &tc_dma, tc = dma_zalloc_coherent(&ha->pdev->dev, EFT_SIZE, &tc_dma,
GFP_KERNEL); GFP_KERNEL);
if (!tc) { if (!tc) {
ql_log(ql_log_warn, vha, 0x00c1, ql_log(ql_log_warn, vha, 0x00c1,
...@@ -1569,7 +1568,6 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) ...@@ -1569,7 +1568,6 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
goto cont_alloc; goto cont_alloc;
} }
memset(tc, 0, EFT_SIZE);
rval = qla2x00_enable_eft_trace(vha, tc_dma, EFT_NUM_BUFFERS); rval = qla2x00_enable_eft_trace(vha, tc_dma, EFT_NUM_BUFFERS);
if (rval) { if (rval) {
ql_log(ql_log_warn, vha, 0x00c2, ql_log(ql_log_warn, vha, 0x00c2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment