]> git.karo-electronics.de Git - linux-beck.git/commitdiff
s390/pci_dma: remove memset from dma_alloc
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Thu, 8 Sep 2016 11:37:09 +0000 (13:37 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 17 Nov 2016 06:10:14 +0000 (07:10 +0100)
Get rid of a useless memset from dma_alloc. Users of dma_alloc who want
zero initialized memory can get it by specifying __GFP_ZERO or use one
of the zalloc variants.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/pci/pci_dma.c

index 0c626c1303cbb57c24f636b7a2bb1e10f2fa4b43..54590207ae0874992b7b74da190a964196b29b43 100644 (file)
@@ -391,8 +391,6 @@ static void *s390_dma_alloc(struct device *dev, size_t size,
                return NULL;
 
        pa = page_to_phys(page);
-       memset((void *) pa, 0, size);
-
        map = s390_dma_map_pages(dev, page, 0, size, DMA_BIDIRECTIONAL, 0);
        if (dma_mapping_error(dev, map)) {
                free_pages(pa, get_order(size));