Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752742Ab3HFBYh (ORCPT ); Mon, 5 Aug 2013 21:24:37 -0400 Received: from ch1ehsobe004.messaging.microsoft.com ([216.32.181.184]:25008 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752361Ab3HFBYf convert rfc822-to-8bit (ORCPT ); Mon, 5 Aug 2013 21:24:35 -0400 X-Forefront-Antispam-Report: CIP:70.37.183.190;KIP:(null);UIP:(null);IPV:NLI;H:mail.freescale.net;RD:none;EFVD:NLI X-SpamScore: -2 X-BigFish: VS-2(zz9371I542I1432Izz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h1de097hz2dh2a8h668h839h8e2h8e3h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h1ad9h1b0ah1b2fh1fb3h1d0ch1d2eh1d3fh1dfeh1dffh1e1dhbe9i1155h) From: Lu Jingchang-B35083 To: Vinod Koul CC: "djbw@fb.com" , "shawn.guo@linaro.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Wang Huan-B18965 , Li Xiaochun-B41219 Subject: RE: [PATCH v2 3/3] dma: Add Freescale eDMA engine driver support Thread-Topic: [PATCH v2 3/3] dma: Add Freescale eDMA engine driver support Thread-Index: AQHOkalqGPXHKXOLdUmC+rshJrmQD5mG0A4AgACPSMA= Date: Tue, 6 Aug 2013 01:24:31 +0000 Message-ID: References: <1375682824-11443-1-git-send-email-b35083@freescale.com> <1375682824-11443-2-git-send-email-b35083@freescale.com> <20130805163444.GQ29095@intel.com> In-Reply-To: <20130805163444.GQ29095@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.193.20.98] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1204 Lines: 37 > -----Original Message----- > From: Vinod Koul [mailto:vinod.koul@intel.com] > Sent: Tuesday, August 06, 2013 12:35 AM > To: Lu Jingchang-B35083 > Cc: djbw@fb.com; shawn.guo@linaro.org; linux-kernel@vger.kernel.org; > linux-arm-kernel@lists.infradead.org; Wang Huan-B18965; Li Xiaochun- > B41219 > Subject: Re: [PATCH v2 3/3] dma: Add Freescale eDMA engine driver support > > + > > +static void fsl_edma_free_desc(struct virt_dma_desc *vdesc) { > > + struct fsl_edma_desc *fsl_desc; > > + int i; > > + > > + fsl_desc = to_fsl_edma_desc(vdesc); > > + for (i = 0; i < fsl_desc->n_tcds; i++) > > + dma_pool_free(fsl_desc->echan->tcd_pool, > > + fsl_desc->tcd[i].vtcd, > > + fsl_desc->tcd[i].ptcd); > > + kfree(fsl_desc); > should this be called with lock held or not? [Lu Jingchang-B35083] The desc list to be freed is got with lock held, and the free for each desc is independent, and the lock is not needed. Thanks. Best Regards, Jingchang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/