* [PATCH 0/5] Use dma_pool_zalloc
@ 2016-04-29 20:09 Julia Lawall
2016-04-29 20:09 ` [PATCH 2/5] dmaengine: vdma: " Julia Lawall
2016-05-03 6:55 ` [PATCH 0/5] " Vinod Koul
0 siblings, 2 replies; 4+ messages in thread
From: Julia Lawall @ 2016-04-29 20:09 UTC (permalink / raw)
To: linux-arm-kernel
Dma_pool_zalloc combines dma_pool_alloc and memset 0. The semantic patch
that makes this transformation is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
T *d;
expression e;
statement S;
@@
d =
- dma_pool_alloc
+ dma_pool_zalloc
(...);
if (!d) S
- memset(d, 0, sizeof(T));
@@
expression d,e;
statement S;
@@
d =
- dma_pool_alloc
+ dma_pool_zalloc
(...);
if (!d) S
- memset(d, 0, sizeof(*d));
// </smpl>
---
drivers/crypto/marvell/tdma.c | 5 ++---
drivers/dma/fsldma.c | 3 +--
drivers/dma/ioat/init.c | 5 ++---
drivers/dma/mmp_pdma.c | 3 +--
drivers/dma/xilinx/xilinx_vdma.c | 3 +--
5 files changed, 7 insertions(+), 12 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/5] dmaengine: vdma: Use dma_pool_zalloc
2016-04-29 20:09 [PATCH 0/5] Use dma_pool_zalloc Julia Lawall
@ 2016-04-29 20:09 ` Julia Lawall
2016-04-29 21:13 ` Sören Brinkmann
2016-05-03 6:55 ` [PATCH 0/5] " Vinod Koul
1 sibling, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2016-04-29 20:09 UTC (permalink / raw)
To: linux-arm-kernel
Dma_pool_zalloc combines dma_pool_alloc and memset 0. The semantic patch
that makes this transformation is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression d,e;
statement S;
@@
d =
- dma_pool_alloc
+ dma_pool_zalloc
(...);
if (!d) S
- memset(d, 0, sizeof(*d));
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
drivers/dma/xilinx/xilinx_vdma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/dma/xilinx/xilinx_vdma.c b/drivers/dma/xilinx/xilinx_vdma.c
index a95d603..6a70987 100644
--- a/drivers/dma/xilinx/xilinx_vdma.c
+++ b/drivers/dma/xilinx/xilinx_vdma.c
@@ -343,11 +343,10 @@ xilinx_vdma_alloc_tx_segment(struct xilinx_vdma_chan *chan)
struct xilinx_vdma_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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/5] dmaengine: vdma: Use dma_pool_zalloc
2016-04-29 20:09 ` [PATCH 2/5] dmaengine: vdma: " Julia Lawall
@ 2016-04-29 21:13 ` Sören Brinkmann
0 siblings, 0 replies; 4+ messages in thread
From: Sören Brinkmann @ 2016-04-29 21:13 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 2016-04-29 at 22:09:09 +0200, Julia Lawall wrote:
> Dma_pool_zalloc combines dma_pool_alloc and memset 0. The semantic patch
> that makes this transformation is as follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression d,e;
> statement S;
> @@
>
> d =
> - dma_pool_alloc
> + dma_pool_zalloc
> (...);
> if (!d) S
> - memset(d, 0, sizeof(*d));
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: S?ren Brinkmann <soren.brinkmann@xilinx.com>
S?ren
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/5] Use dma_pool_zalloc
2016-04-29 20:09 [PATCH 0/5] Use dma_pool_zalloc Julia Lawall
2016-04-29 20:09 ` [PATCH 2/5] dmaengine: vdma: " Julia Lawall
@ 2016-05-03 6:55 ` Vinod Koul
1 sibling, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2016-05-03 6:55 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Apr 29, 2016 at 10:09:07PM +0200, Julia Lawall wrote:
> Dma_pool_zalloc combines dma_pool_alloc and memset 0. The semantic patch
> that makes this transformation is as follows: (http://coccinelle.lip6.fr/)
Applied all dmaengine patches
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-03 6:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-29 20:09 [PATCH 0/5] Use dma_pool_zalloc Julia Lawall
2016-04-29 20:09 ` [PATCH 2/5] dmaengine: vdma: " Julia Lawall
2016-04-29 21:13 ` Sören Brinkmann
2016-05-03 6:55 ` [PATCH 0/5] " Vinod Koul
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).