Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1402767
| From | Kedareswara rao Appana <appana.durga.rao@xilinx.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 2/4] dmaengine: vdma: Use dma_pool_zalloc |
| Date | 2016-05-18 09:50 +0200 |
| Message-ID | <rA4oW-7vr-13@gated-at.bofh.it> (permalink) |
| References | <rA4oV-7vr-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
dma_pool_zalloc combines dma_pool_alloc and memset 0 this patch updates the driver to use dma_pool_zalloc. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> --- Changes for v2: --> New patch. drivers/dma/xilinx/xilinx_vdma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_vdma.c b/drivers/dma/xilinx/xilinx_vdma.c index 3edd454..0f5b38a 100644 --- a/drivers/dma/xilinx/xilinx_vdma.c +++ b/drivers/dma/xilinx/xilinx_vdma.c @@ -498,11 +498,10 @@ xilinx_cdma_alloc_tx_segment(struct xilinx_dma_chan *chan) struct xilinx_cdma_tx_segment *segment; dma_addr_t phys; - segment = dma_pool_alloc(chan->desc_pool, GFP_ATOMIC, &phys); + segment = dma_pool_zalloc(chan->desc_pool, GFP_ATOMIC, &phys); if (!segment) return NULL; - memset(segment, 0, sizeof(*segment)); segment->phys = phys; return segment; @@ -520,11 +519,10 @@ xilinx_axidma_alloc_tx_segment(struct xilinx_dma_chan *chan) struct xilinx_axidma_tx_segment *segment; dma_addr_t phys; - segment = dma_pool_alloc(chan->desc_pool, GFP_ATOMIC, &phys); + segment = dma_pool_zalloc(chan->desc_pool, GFP_ATOMIC, &phys); if (!segment) return NULL; - memset(segment, 0, sizeof(*segment)); segment->phys = phys; return segment; -- 2.1.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/4] dmaengine: vdma: AXI DMA's enhancments Kedareswara rao Appana <appana.durga.rao@xilinx.com> - 2016-05-18 09:50 +0200 [PATCH v2 4/4] dmaengine: vdma: Add 64 bit addressing support for the axi cdma Kedareswara rao Appana <appana.durga.rao@xilinx.com> - 2016-05-18 09:50 +0200 [PATCH v2 2/4] dmaengine: vdma: Use dma_pool_zalloc Kedareswara rao Appana <appana.durga.rao@xilinx.com> - 2016-05-18 09:50 +0200 [PATCH v2 3/4] dmaengine: vdma: Add 64 bit addressing support for the axi dma Kedareswara rao Appana <appana.durga.rao@xilinx.com> - 2016-05-18 09:50 +0200 [PATCH v2 1/4] dmaengine: vdma: Add support for cyclic dma mode Kedareswara rao Appana <appana.durga.rao@xilinx.com> - 2016-05-18 09:50 +0200
csiph-web