From: Joe Perches Date: Sun, 15 Jun 2014 20:37:32 +0000 (-0700) Subject: ata: Use dma_zalloc_coherent X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d0a2dbab95ce56761f42da333cdb6db8ee561a69;p=karo-tx-linux.git ata: Use dma_zalloc_coherent Use the zeroing function instead of dma_alloc_coherent & memset(,0,) Signed-off-by: Joe Perches Signed-off-by: Tejun Heo (cherry picked from commit 94463a9cadc7f72a70ec6ee801109c2f1e44a123) --- diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index db3c29d6a105..65071591b143 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -734,13 +734,12 @@ static int sata_fsl_port_start(struct ata_port *ap) if (!pp) return -ENOMEM; - mem = dma_alloc_coherent(dev, SATA_FSL_PORT_PRIV_DMA_SZ, &mem_dma, - GFP_KERNEL); + mem = dma_zalloc_coherent(dev, SATA_FSL_PORT_PRIV_DMA_SZ, &mem_dma, + GFP_KERNEL); if (!mem) { kfree(pp); return -ENOMEM; } - memset(mem, 0, SATA_FSL_PORT_PRIV_DMA_SZ); pp->cmdslot = mem; pp->cmdslot_paddr = mem_dma;