aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_mbox.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-09-03 12:56:12 -0400
committerChristoph Hellwig <hch@lst.de>2014-09-16 12:10:06 -0400
commit1aee383d5912de15af3045a63a07e98f760f041c (patch)
tree6e58b144d1354008d497e3cd0003e9cb6e69e090 /drivers/scsi/lpfc/lpfc_mbox.c
parent9ab9b134a86ed9f897a29d2ba5abb93f7b162dca (diff)
lpfc: use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,) Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: James Smart <james.smart@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_mbox.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_mbox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c
index 1f292e29d566..06241f590c1e 100644
--- a/drivers/scsi/lpfc/lpfc_mbox.c
+++ b/drivers/scsi/lpfc/lpfc_mbox.c
@@ -1811,12 +1811,12 @@ lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox,
1811 * page, this is used as a priori size of SLI4_PAGE_SIZE for 1811 * page, this is used as a priori size of SLI4_PAGE_SIZE for
1812 * the later DMA memory free. 1812 * the later DMA memory free.
1813 */ 1813 */
1814 viraddr = dma_alloc_coherent(&phba->pcidev->dev, SLI4_PAGE_SIZE, 1814 viraddr = dma_zalloc_coherent(&phba->pcidev->dev,
1815 &phyaddr, GFP_KERNEL); 1815 SLI4_PAGE_SIZE, &phyaddr,
1816 GFP_KERNEL);
1816 /* In case of malloc fails, proceed with whatever we have */ 1817 /* In case of malloc fails, proceed with whatever we have */
1817 if (!viraddr) 1818 if (!viraddr)
1818 break; 1819 break;
1819 memset(viraddr, 0, SLI4_PAGE_SIZE);
1820 mbox->sge_array->addr[pagen] = viraddr; 1820 mbox->sge_array->addr[pagen] = viraddr;
1821 /* Keep the first page for later sub-header construction */ 1821 /* Keep the first page for later sub-header construction */
1822 if (pagen == 0) 1822 if (pagen == 0)