From: appana.durga.rao@xilinx.com (Kedareswara rao Appana)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/4] dmaengine: vdma: Use dma_pool_zalloc
Date: Wed, 18 May 2016 13:17:31 +0530 [thread overview]
Message-ID: <1463557653-1687-3-git-send-email-appanad@xilinx.com> (raw)
In-Reply-To: <1463557653-1687-1-git-send-email-appanad@xilinx.com>
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
next prev parent reply other threads:[~2016-05-18 7:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-18 7:47 [PATCH v2 0/4] dmaengine: vdma: AXI DMA's enhancments Kedareswara rao Appana
2016-05-18 7:47 ` [PATCH v2 1/4] dmaengine: vdma: Add support for cyclic dma mode Kedareswara rao Appana
2016-06-07 6:18 ` Vinod Koul
2016-05-18 7:47 ` Kedareswara rao Appana [this message]
2016-06-07 6:19 ` [PATCH v2 2/4] dmaengine: vdma: Use dma_pool_zalloc Vinod Koul
2016-05-18 7:47 ` [PATCH v2 3/4] dmaengine: vdma: Add 64 bit addressing support for the axi dma Kedareswara rao Appana
2016-06-07 6:17 ` Vinod Koul
2016-06-07 6:13 ` Appana Durga Kedareswara Rao
2016-05-18 7:47 ` [PATCH v2 4/4] dmaengine: vdma: Add 64 bit addressing support for the axi cdma Kedareswara rao Appana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463557653-1687-3-git-send-email-appanad@xilinx.com \
--to=appana.durga.rao@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).