aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-06-15 16:37:51 -0400
committerChristoph Hellwig <hch@lst.de>2014-07-25 17:16:55 -0400
commit0ea85b50f8e25649fa711be560b282263d3e756c (patch)
tree2938b5d1744507c425cad79026739b7c17850946 /drivers/scsi/qla2xxx
parent44416c42ad200a9bfa34a9e46e119a29e282925c (diff)
qla2xxx: Use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,) Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index e2184412617d..46990f4ceb40 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1526,8 +1526,8 @@ try_fce:
1526 FCE_SIZE, ha->fce, ha->fce_dma); 1526 FCE_SIZE, ha->fce, ha->fce_dma);
1527 1527
1528 /* Allocate memory for Fibre Channel Event Buffer. */ 1528 /* Allocate memory for Fibre Channel Event Buffer. */
1529 tc = dma_alloc_coherent(&ha->pdev->dev, FCE_SIZE, &tc_dma, 1529 tc = dma_zalloc_coherent(&ha->pdev->dev, FCE_SIZE, &tc_dma,
1530 GFP_KERNEL); 1530 GFP_KERNEL);
1531 if (!tc) { 1531 if (!tc) {
1532 ql_log(ql_log_warn, vha, 0x00be, 1532 ql_log(ql_log_warn, vha, 0x00be,
1533 "Unable to allocate (%d KB) for FCE.\n", 1533 "Unable to allocate (%d KB) for FCE.\n",
@@ -1535,7 +1535,6 @@ try_fce:
1535 goto try_eft; 1535 goto try_eft;
1536 } 1536 }
1537 1537
1538 memset(tc, 0, FCE_SIZE);
1539 rval = qla2x00_enable_fce_trace(vha, tc_dma, FCE_NUM_BUFFERS, 1538 rval = qla2x00_enable_fce_trace(vha, tc_dma, FCE_NUM_BUFFERS,
1540 ha->fce_mb, &ha->fce_bufs); 1539 ha->fce_mb, &ha->fce_bufs);
1541 if (rval) { 1540 if (rval) {
@@ -1560,8 +1559,8 @@ try_eft:
1560 EFT_SIZE, ha->eft, ha->eft_dma); 1559 EFT_SIZE, ha->eft, ha->eft_dma);
1561 1560
1562 /* Allocate memory for Extended Trace Buffer. */ 1561 /* Allocate memory for Extended Trace Buffer. */
1563 tc = dma_alloc_coherent(&ha->pdev->dev, EFT_SIZE, &tc_dma, 1562 tc = dma_zalloc_coherent(&ha->pdev->dev, EFT_SIZE, &tc_dma,
1564 GFP_KERNEL); 1563 GFP_KERNEL);
1565 if (!tc) { 1564 if (!tc) {
1566 ql_log(ql_log_warn, vha, 0x00c1, 1565 ql_log(ql_log_warn, vha, 0x00c1,
1567 "Unable to allocate (%d KB) for EFT.\n", 1566 "Unable to allocate (%d KB) for EFT.\n",
@@ -1569,7 +1568,6 @@ try_eft:
1569 goto cont_alloc; 1568 goto cont_alloc;
1570 } 1569 }
1571 1570
1572 memset(tc, 0, EFT_SIZE);
1573 rval = qla2x00_enable_eft_trace(vha, tc_dma, EFT_NUM_BUFFERS); 1571 rval = qla2x00_enable_eft_trace(vha, tc_dma, EFT_NUM_BUFFERS);
1574 if (rval) { 1572 if (rval) {
1575 ql_log(ql_log_warn, vha, 0x00c2, 1573 ql_log(ql_log_warn, vha, 0x00c2,