All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Use dma_pool_zalloc
@ 2016-04-29 20:09 ` Julia Lawall
  0 siblings, 0 replies; 27+ 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] 27+ messages in thread

end of thread, other threads:[~2016-05-03  8:17 UTC | newest]

Thread overview: 27+ 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 ` Julia Lawall
2016-04-29 20:09 ` Julia Lawall
2016-04-29 20:09 ` [PATCH 1/5] dmaengine: mmp_pdma: " Julia Lawall
2016-04-29 20:09   ` Julia Lawall
2016-04-29 20:09 ` [PATCH 2/5] dmaengine: vdma: " Julia Lawall
2016-04-29 20:09   ` Julia Lawall
2016-04-29 20:09   ` Julia Lawall
2016-04-29 21:13   ` Sören Brinkmann
2016-04-29 21:13     ` Sören Brinkmann
2016-04-29 21:13     ` Sören Brinkmann
2016-04-29 20:09 ` [PATCH 3/5] dmaengine: ioatdma: " Julia Lawall
2016-04-29 20:09   ` Julia Lawall
2016-04-29 20:09 ` [PATCH 4/5] crypto: " Julia Lawall
2016-04-29 20:09   ` Julia Lawall
2016-04-29 20:37   ` Boris Brezillon
2016-04-29 20:37     ` Boris Brezillon
2016-05-03  8:17   ` Herbert Xu
2016-05-03  8:17     ` Herbert Xu
2016-04-29 20:09 ` [PATCH 5/5] dmaengine: fsldma: " Julia Lawall
2016-04-29 20:09   ` Julia Lawall
2016-04-29 20:48   ` Yang-Leo Li
2016-04-29 20:48     ` Yang-Leo Li
2016-04-29 20:48     ` Yang-Leo Li
2016-05-03  6:50 ` [PATCH 0/5] " Vinod Koul
2016-05-03  6:55   ` Vinod Koul
2016-05-03  6:55   ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.