From patchwork Wed May 6 10:28:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Rafa=C5=82_Hibner?= X-Patchwork-Id: 11530999 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2AC9D81 for ; Wed, 6 May 2020 10:35:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A675A20663 for ; Wed, 6 May 2020 10:35:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OyVHkIuN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A675A20663 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=secom.com.pl Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Md8uxVqonudcpdLUU8MIu6pmC16uGJnTfLmxTgVrsdg=; b=OyVHkIuNx4yuXe 4mAnPW10DJ1Fx7vaW9hXrqWl1Arr15/aeW8KCqOEzJOrGblAhKJiy6LJfcfWpZ4usJ+UO/K6lIoAz LLWxKPPitgmV2rGlChEZOpBPRp5yc28CHykIWWqOY9Mo6GD33gX8vImGWPRu0Qn+vR7ulaSI6RoMk 69ouiAUo3qTeiH8Zs+rBdhM4M9ViU5NZJYlgHxBCE0vWOlQV1DVTdeBhHGjslHL7ahAHZ0YIkPGg4 4c5SP8z/GDCf25fhTsgvnXo3Rgg7SAtOTurn0zHXdPGHnM/PHcQ4GuKclUowY30+Ayw3g1nfVQTO/ /DViP0EPL0f0vfFtjHVQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWHOj-0005BK-Pc; Wed, 06 May 2020 10:35:29 +0000 Received: from mail.secom.com.pl ([213.216.87.26]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWHOR-00035N-6i for linux-arm-kernel@lists.infradead.org; Wed, 06 May 2020 10:35:13 +0000 Received: from debian-2019.secom.com.pl ([192.168.192.41]) by mail.secom.com.pl; Wed, 06 May 2020 12:34:46 +0200 From: =?utf-8?q?Rafa=C5=82_Hibner?= To: Subject: [PATCH V2] dma: zynqmp_dma: Move list_del inside zynqmp_dma_free_descriptor. Date: Wed, 6 May 2020 12:28:45 +0200 Message-Id: <20200506102844.2259-1-rafal.hibner@secom.com.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200506_033511_624039_834FF3FD X-CRM114-Status: GOOD ( 10.99 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Rafa=C5=82_Hibner?= , Radhey Shyam Pandey , Michal Simek , linux-kernel@vger.kernel.org, Vinod Koul , Appana Durga Kedareswara rao , dmaengine@vger.kernel.org, Harini Katakam , Dan Williams , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org List elements are not formally removed from list during zynqmp_dma_reset. Signed-off-by: Rafal Hibner --- > Looking at this, i think it would make sense to do list_splice_init() before we > send the list to be freed. Moving list_del inside zynqmp_dma_free_descriptor fixes the problem just as well and avoids INIT_LIST_HEAD(list). I still don't see how list_splice_init would help here. Regards, Rafal --- drivers/dma/xilinx/zynqmp_dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c index 931e41a72..df0403335 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c @@ -434,6 +434,7 @@ static void zynqmp_dma_free_descriptor(struct zynqmp_dma_chan *chan, struct zynqmp_dma_desc_sw *child, *next; chan->desc_free_cnt++; + list_del(&sdesc->node); list_add_tail(&sdesc->node, &chan->free_list); list_for_each_entry_safe(child, next, &sdesc->tx_list, node) { chan->desc_free_cnt++; @@ -604,8 +605,6 @@ static void zynqmp_dma_chan_desc_cleanup(struct zynqmp_dma_chan *chan) dma_async_tx_callback callback; void *callback_param; - list_del(&desc->node); - callback = desc->async_tx.callback; callback_param = desc->async_tx.callback_param; if (callback) {