Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1416847

Re: [PATCH] dmaengine: xilinx_vdma: Use dma_pool_zalloc

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Vinod Koul <vinod.koul@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] dmaengine: xilinx_vdma: Use dma_pool_zalloc
Date Wed, 08 Jun 2016 05:30:01 +0200
Message-ID <rHClP-336-1@gated-at.bofh.it> (permalink)
References <rHuHE-6FD-7@gated-at.bofh.it>
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.26,437,1459839600"; d="scan'208";a="823840799"
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 23
Organization linux.* mail to news gateway
X-Original-Cc dan.j.williams@intel.com, michal.simek@xilinx.com, soren.brinkmann@xilinx.com, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, julia.lawall@lip6.fr
X-Original-Date Wed, 8 Jun 2016 09:05:15 +0530
X-Original-Message-ID <20160608033514.GR16910@localhost>
X-Original-References <20160607191838.GA26841@amitoj-Inspiron-3542>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1416847

Show key headers only | View raw


On Wed, Jun 08, 2016 at 12:48:38AM +0530, Amitoj Kaur Chawla wrote:
> Dma_pool_zalloc combines dma_pool_alloc and memset 0.
> 
> The Coccinelle semantic patch used to make this change is as follows:
> @@
> type T;
> T *d;
> expression e;
> statement S;
> @@
> 
>         d =
> -            dma_pool_alloc
> +            dma_pool_zalloc
>              (...);
>         if (!d) S
> -       memset(d, 0, sizeof(T));

Thanks for your patch, but I have already applied a similar patch fixing
this.

-- 
~Vinod

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] dmaengine: xilinx_vdma: Use dma_pool_zalloc Amitoj Kaur Chawla <amitoj1606@gmail.com> - 2016-06-07 21:20 +0200
  Re: [PATCH] dmaengine: xilinx_vdma: Use dma_pool_zalloc Vinod Koul <vinod.koul@intel.com> - 2016-06-08 05:30 +0200

csiph-web