From: Frank.Li@oss.nxp.com
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
Andre Przywara <andre.przywara@arm.com>,
bui duc phuc <phucduc.bui@gmail.com>,
Arnd Bergmann <arnd@arndb.de>, Kees Cook <kees@kernel.org>,
Li Youhong <liyouhong@kylinos.cn>, Frank Li <Frank.Li@nxp.com>,
netdev@vger.kernel.org (open list:NETWORKING DRIVERS),
linux-arm-kernel@lists.infradead.org (moderated
list:ARM/Allwinner sunXi SoC support),
linux-sunxi@lists.linux.dev (open list:ARM/Allwinner sunXi SoC
support), linux-kernel@vger.kernel.org (open list)
Cc: vkoul@kernel.org, imx@lists.linux.dev
Subject: [PATCH 1/1] net: allwinner: remove dmaengine_desc_free()
Date: Tue, 29 Sep 2026 15:06:36 -0400 [thread overview]
Message-ID: <20260929190640.3516766-1-Frank.Li@oss.nxp.com> (raw)
From: Frank Li <Frank.Li@nxp.com>
dmaengine_desc_free() is designed for DMA_CTRL_REUSE. If DMA_CTRL_REUSE
is not set, dmaengine_desc_free() will return -EPERM.
if (!dmaengine_desc_test_reuse(desc))
return -EPERM;
So calling dmaengine_desc_free() does nothing.
dmaengine_terminate_(a)sync() will free all already allocated descriptors.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
drivers/net/ethernet/allwinner/sun4i-emac.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
index 0ba67a55705d6..09b2abdfc9e84 100644
--- a/drivers/net/ethernet/allwinner/sun4i-emac.c
+++ b/drivers/net/ethernet/allwinner/sun4i-emac.c
@@ -300,7 +300,7 @@ static int emac_dma_inblk_32bit(struct emac_board_info *db,
if (!req) {
dev_err(db->dev, "alloc emac dma req error.\n");
ret = -ENOMEM;
- goto alloc_req_err;
+ goto prepare_err;
}
desc->callback_param = req;
@@ -319,9 +319,6 @@ static int emac_dma_inblk_32bit(struct emac_board_info *db,
submit_err:
emac_free_dma_req(req);
-alloc_req_err:
- dmaengine_desc_free(desc);
-
prepare_err:
dma_unmap_single(db->dev, rxbuf, count, DMA_FROM_DEVICE);
return ret;
--
2.43.0
next reply other threads:[~2026-09-29 19:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 19:06 Frank.Li [this message]
2026-09-29 21:29 ` Joe Damato
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=20260929190640.3516766-1-Frank.Li@oss.nxp.com \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=andre.przywara@arm.com \
--cc=andrew+netdev@lunn.ch \
--cc=arnd@arndb.de \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=imx@lists.linux.dev \
--cc=jernej.skrabec@gmail.com \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=liyouhong@kylinos.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=phucduc.bui@gmail.com \
--cc=samuel@sholland.org \
--cc=vkoul@kernel.org \
--cc=wens@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
all inboxes | Powered by JetHome®