Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752854AbcD2UYf (ORCPT ); Fri, 29 Apr 2016 16:24:35 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:17635 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752534AbcD2UYc (ORCPT ); Fri, 29 Apr 2016 16:24:32 -0400 X-IronPort-AV: E=Sophos;i="5.24,553,1454972400"; d="scan'208";a="176255462" From: Julia Lawall To: linux-crypto@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , linux-kernel@vger.kernel.org, Dan Williams , dmaengine@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 0/5] Use dma_pool_zalloc Date: Fri, 29 Apr 2016 22:09:07 +0200 Message-Id: <1461960552-7429-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 823 Lines: 39 Dma_pool_zalloc combines dma_pool_alloc and memset 0. The semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // @@ 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)); // --- 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(-)