]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ata: Use dma_zalloc_coherent
authorJoe Perches <joe@perches.com>
Sun, 15 Jun 2014 20:37:32 +0000 (13:37 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 17 Jun 2014 14:23:26 +0000 (10:23 -0400)
Use the zeroing function instead of dma_alloc_coherent & memset(,0,)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/sata_fsl.c

index 616a6d2ac20c7859668eaaf61e3bbe68d956db1c..07bc7e4dbd04b836722d42b1051dc3da33f99a9d 100644 (file)
@@ -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;