lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260128-dma_ll_comlib-v1-3-1b1fa2c671f9@nxp.com>
Date: Wed, 28 Jan 2026 13:05:22 -0500
From: Frank Li <Frank.Li@....com>
To: Vinod Koul <vkoul@...nel.org>
Cc: linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org, 
 imx@...ts.linux.dev, joy.zou@....com, Frank Li <Frank.Li@....com>
Subject: [PATCH RFC 03/12] dmaengine: fsl-edma: Remove redundant echan from
 struct fsl_edma_desc

The echan pointer can be obtained from the dma_async_tx_descriptor embedded
in struct virt_dma_desc. So remove echan from struct fsl_edma_desc.

Signed-off-by: Frank Li <Frank.Li@....com>
---
 drivers/dma/fsl-edma-common.c | 4 ++--
 drivers/dma/fsl-edma-common.h | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
index 396ff6dfa99a150f9ce34effd64534e3d8e8576b..61387c4edc910c8a806cc2c6f0fee2e690424bac 100644
--- a/drivers/dma/fsl-edma-common.c
+++ b/drivers/dma/fsl-edma-common.c
@@ -228,7 +228,8 @@ void fsl_edma_free_desc(struct virt_dma_desc *vdesc)
 
 	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,
+		dma_pool_free(to_fsl_edma_chan(vdesc->tx.chan)->tcd_pool,
+			      fsl_desc->tcd[i].vtcd,
 			      fsl_desc->tcd[i].ptcd);
 	kfree(fsl_desc);
 }
@@ -555,7 +556,6 @@ static struct fsl_edma_desc *fsl_edma_alloc_desc(struct fsl_edma_chan *fsl_chan,
 	if (!fsl_desc)
 		return NULL;
 
-	fsl_desc->echan = fsl_chan;
 	fsl_desc->n_tcds = sg_len;
 	for (i = 0; i < sg_len; i++) {
 		fsl_desc->tcd[i].vtcd = dma_pool_alloc(fsl_chan->tcd_pool,
diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h
index 8e45770a0d3960ee34361fe5884a169de64e14a7..a0d83ad783f7a53caab93d280c6e40f63b8e9e5c 100644
--- a/drivers/dma/fsl-edma-common.h
+++ b/drivers/dma/fsl-edma-common.h
@@ -196,7 +196,6 @@ struct fsl_edma_chan {
 
 struct fsl_edma_desc {
 	struct virt_dma_desc		vdesc;
-	struct fsl_edma_chan		*echan;
 	bool				iscyclic;
 	enum dma_transfer_direction	dirn;
 	unsigned int			n_tcds;

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ