linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Use dma_pool_zalloc
@ 2016-04-29 20:09 Julia Lawall
  2016-04-29 20:09 ` [PATCH 5/5] dmaengine: fsldma: " 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-crypto
  Cc: kernel-janitors, linux-arm-kernel, Sören Brinkmann,
	linux-kernel, Dan Williams, dmaengine, linuxppc-dev

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

end of thread, other threads:[~2016-05-03  6:49 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 5/5] dmaengine: fsldma: " Julia Lawall
2016-04-29 20:48   ` Yang-Leo Li
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).