Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4973844pxv; Tue, 27 Jul 2021 23:17:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQTIAYlyvFyvTv+scLh2Y45VFAeFl3oTZ91XRDvnbtMn5EHzBsI3+GGCuvijDLJw2cEq31 X-Received: by 2002:aa7:ca10:: with SMTP id y16mr23239465eds.308.1627453058338; Tue, 27 Jul 2021 23:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627453058; cv=none; d=google.com; s=arc-20160816; b=g2bC4s2THS7MVK2aGe2Xr5zNncMjzQJ7v6gWyf0LP6YbUEmWzHPhjZcwIu4B+H6sWD TvCJsLgwUfq4Go/IUZ+KG/boct0ikHg9y8Diswxhrq+xz1CrzztrsUIGDcV9RAqogxcs RnIAsz1thOHCquaDVxTimQWm9FMg7FhyHwohHM8NYVm6ZoKTZzheBvO31++AfrBxMD6G 1cnYA53H5qg2X301ppJu6BsJYA5pcLREKhdI8qKBepUs+dkrTh4d1911zWFkPHIbW1xs f0yXwK4YWuQbsxfvTVdVevxm5X0yYFfFQbRYHPhQh6MRdlDuxl0t0ZRnpq3c7eCoN5y4 6b/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kDrovFAKlX/1KceIdiy4AZNBXAFYRizrf1/FlWU+pkM=; b=t+lwSkAOUiRtpr8igs1C5ZMsvpwmsgFYmoYz1XUPtz1q2vTyakxWSeACDd5ZkDtHzv X1IEcNLkcbXo7RILMVE3xmMFZmNW2WSHbNsJ6RBbytw+J4vyK1SBGA5puYQenbLq4ov/ tBTwKyeSmjgtCdKch4lgVt0ZEi4YWiBUXitVLT0fmXfxbDSnhKbn+z4FL1BtCvXBcKjC 7apHaUx2ZqUXYFS3UOhG5VS8cOJIPnOrvMoJf/RZQmSCNhHLf2rN2JjvGhmrNxma+/Bp h8Y3RH8kzi/9QV8y6su0+vw635Ovx+92cwBzmfrv0oKANEp/HTKNFC4DzDmzRk3MffdA yF2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=co2TwQ8I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k20si5149261eds.481.2021.07.27.23.17.10; Tue, 27 Jul 2021 23:17:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=co2TwQ8I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234090AbhG1GPW (ORCPT + 99 others); Wed, 28 Jul 2021 02:15:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:56856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233574AbhG1GPV (ORCPT ); Wed, 28 Jul 2021 02:15:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C914460295; Wed, 28 Jul 2021 06:15:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627452920; bh=UZLbpTMkNJx9XNrLl9ORaFnwVlTNF/WZnt0ahFZqB9w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=co2TwQ8IRyzoFn91SVBLuzHs23MNwMnTcu4yp+1ZXeehNtSxkUhP0FED2noKTaWXw e2WH/pO18L3JFSP6ggiYXWCGp6AMqufWtXSrMCXE5nsY9AYY7Z+4y8XQWWbbSpMIIt CPjxw7U7TlG9lzMf4JcZERJUbtbOY4pm7oCzQpb4mGhRmjFxmIHN+yONeMuNK9LAPn O8Akf6p8bKxvPcq4Yet8+bgaqrSNJ5Na6Pn0S1LP3PYJnSNsK84ZDYlYm5VvajYyxF qsbbq4fD500cbGKYU9CJkVHA0EfkaaIfTptuilSSw41Uw1dPC7XSt3PYw7C+3/YiU7 EJ6t3TSpkotjA== Date: Wed, 28 Jul 2021 11:45:16 +0530 From: Vinod Koul To: Sanjay R Mehta Cc: gregkh@linuxfoundation.org, dan.j.williams@intel.com, Thomas.Lendacky@amd.com, Shyam-sundar.S-k@amd.com, Nehal-bakulchandra.Shah@amd.com, robh@kernel.org, mchehab+samsung@kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org Subject: Re: [PATCH v10 2/3] dmaengine: ptdma: register PTDMA controller as a DMA resource Message-ID: References: <1624207298-115928-1-git-send-email-Sanju.Mehta@amd.com> <1624207298-115928-3-git-send-email-Sanju.Mehta@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1624207298-115928-3-git-send-email-Sanju.Mehta@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20-06-21, 11:41, Sanjay R Mehta wrote: > From: Sanjay R Mehta > > Register ptdma queue to Linux dmaengine framework as general-purpose > DMA channels. Mostly looks good, one question below: > +static struct pt_dma_desc *pt_alloc_dma_desc(struct pt_dma_chan *chan, > + unsigned long flags) > +{ > + struct pt_dma_desc *desc; > + > + desc = kmem_cache_zalloc(chan->pt->dma_desc_cache, GFP_NOWAIT); > + if (!desc) > + return NULL; > + > + vchan_tx_prep(&chan->vc, &desc->vd, flags); > + > + desc->pt = chan->pt; > + desc->issued_to_hw = 0; > + desc->status = DMA_IN_PROGRESS; where is this descriptor freed? -- ~Vinod