public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Rafał Hibner" <rafal.hibner@secom.com.pl>
Cc: "Rafał Hibner" <rafal.hibner@secom.com.pl>,
	"Radhey Shyam Pandey" <radhey.shyam.pandey@xilinx.com>,
	"Michal Simek" <michal.simek@xilinx.com>,
	linux-kernel@vger.kernel.org, "Vinod Koul" <vkoul@kernel.org>,
	"Appana Durga Kedareswara rao" <appana.durga.rao@xilinx.com>,
	dmaengine@vger.kernel.org,
	"Harini Katakam" <harini.katakam@xilinx.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2] dma: zynqmp_dma: Move list_del inside zynqmp_dma_free_descriptor.
Date: Wed,  6 May 2020 12:28:45 +0200	[thread overview]
Message-ID: <20200506102844.2259-1-rafal.hibner@secom.com.pl> (raw)
In-Reply-To: <MW2PR02MB37705416E18413689BFFC7C3C9A60@MW2PR02MB3770.namprd02.prod.outlook.com>

List elements are not formally removed from list during zynqmp_dma_reset.

Signed-off-by: Rafal Hibner <rafal.hibner@secom.com.pl>
---
> 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) {
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-05-06 10:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 14:32 [PATCH] dma: zynqmp_dma: Initialize descriptor list after freeing during reset Rafał Hibner
2020-05-02 12:32 ` Vinod Koul
2020-05-02 13:00   ` Rafał Hibner
2020-05-04  5:16     ` Vinod Koul
2020-05-04  5:33       ` Harini Katakam
2020-05-06 10:28         ` Rafał Hibner [this message]
2020-05-15  5:50           ` [PATCH V2] dma: zynqmp_dma: Move list_del inside zynqmp_dma_free_descriptor Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200506102844.2259-1-rafal.hibner@secom.com.pl \
    --to=rafal.hibner@secom.com.pl \
    --cc=appana.durga.rao@xilinx.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=harini.katakam@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=radhey.shyam.pandey@xilinx.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox