From: Joe Damato <joe@dama.to>
To: Frank Li <Frank.li@oss.nxp.com>
Cc: 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>,
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
Michal Simek <michal.simek@amd.com>,
Stephan Gerhold <stephan@gerhold.net>,
Loic Poulain <loic.poulain@oss.qualcomm.com>,
Sergey Ryazanov <ryazanov.s.a@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>,
Frank Li <Frank.Li@nxp.com>,
Andre Przywara <andre.przywara@arm.com>,
Li Youhong <liyouhong@kylinos.cn>, Arnd Bergmann <arnd@arndb.de>,
bui duc phuc <phucduc.bui@gmail.com>,
Yicong Hui <yiconghui@gmail.com>, Simon Horman <horms@kernel.org>,
"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
"moderated list:ARM/Allwinner sunXi SoC support"
<linux-arm-kernel@lists.infradead.org>,
"open list:ARM/Allwinner sunXi SoC support"
<linux-sunxi@lists.linux.dev>,
open list <linux-kernel@vger.kernel.org>,
"open list:ARM/QUALCOMM MAILING LIST"
<linux-arm-msm@vger.kernel.org>,
imx@lists.linux.dev, vkoul@kernel.org
Subject: Re: [PATCH] net: dma: use dmaengine_desc_set_callback()
Date: Tue, 3 Nov 2026 10:48:59 -0800 [thread overview]
Message-ID: <auosm8mCULyafyny@devvm20253.cco0.facebook.com> (raw)
In-Reply-To: <aun4W3dvmfWRDFeQ@SMW015318>
On Tue, Nov 03, 2026 at 09:06:03AM -0600, Frank Li wrote:
> On Mon, Nov 02, 2026 at 03:28:33PM -0800, Joe Damato wrote:
> > On Mon, Nov 02, 2026 at 02:19:16PM -0500, Frank.Li@oss.nxp.com wrote:
> > > From: Frank Li <Frank.Li@nxp.com>
> > >
> > > Replace open-coded assignments to callback and callback_param fields
> > > of struct dma_async_tx_descriptor with calls to the
> > > dmaengine_desc_set_callback() helper across net drivers.
> > >
> > > No functional change intended. Prepare to make struct
> > > dma_async_tx_descriptor private to the DMA engine.
> > >
> > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > ---
> > > drivers/net/ethernet/allwinner/sun4i-emac.c | 3 +--
> > > drivers/net/ethernet/micrel/ks8842.c | 6 ++----
> > > drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 6 ++----
> > > drivers/net/wwan/qcom_bam_dmux.c | 10 ++++------
> > > 4 files changed, 9 insertions(+), 16 deletions(-)
> >
> > [...]
> >
> > > diff --git a/drivers/net/wwan/qcom_bam_dmux.c b/drivers/net/wwan/qcom_bam_dmux.c
> > > index cc6ace8d64371..1479f8362e04e 100644
> > > --- a/drivers/net/wwan/qcom_bam_dmux.c
> > > +++ b/drivers/net/wwan/qcom_bam_dmux.c
> > > @@ -195,9 +195,8 @@ static bool bam_dmux_skb_dma_submit_tx(struct bam_dmux_skb_dma *skb_dma)
> > > return false;
> > > }
> > >
> > > - desc->callback = bam_dmux_tx_callback;
> > > - desc->callback_param = skb_dma;
> > > - desc->cookie = dmaengine_submit(desc);
> > > + dmaengine_desc_set_callback(desc, bam_dmux_tx_callback, NULL, skb_dma);
> > > + dmaengine_submit(desc);
> > > return true;
> > > }
> > >
> > > @@ -477,9 +476,8 @@ static bool bam_dmux_skb_dma_submit_rx(struct bam_dmux_skb_dma *skb_dma)
> > > return false;
> > > }
> > >
> > > - desc->callback = bam_dmux_rx_callback;
> > > - desc->callback_param = skb_dma;
> > > - desc->cookie = dmaengine_submit(desc);
> > > + dmaengine_desc_set_callback(desc, bam_dmux_rx_callback, NULL, skb_dma);
> > > + dmaengine_submit(desc);
> >
> > I noticed in the above that the return value of dmaengine_submit is discarded
> > instead of stored.
> >
> > Is that intentional? I suppose it might be because AFAICT cookie is never
> > used and the commit message says "no functional change intended".
>
> dma_cookie_assign() already set desc->cookie in dmaengine_submit(). Of couse
> it is not obvious. Do you need me update commit message to descript it.
Ah, I see it now. In the tx_submit callback it looks like dma drivers set the
cookie.
So removing it here really is a no-op since it was getting set, as you said,
during submit.
My mistake. I don't think it's worth respinning just to fix the commit
message just because I didn't dig deep enough :)
next prev parent reply other threads:[~2026-11-03 18:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 19:19 [PATCH] net: dma: use dmaengine_desc_set_callback() Frank.Li
2026-11-02 23:28 ` Joe Damato
2026-11-03 15:06 ` Frank Li
2026-11-03 18:48 ` Joe Damato [this message]
2026-11-03 8:55 ` Loic Poulain
2026-11-04 9:03 ` Gupta, Suraj
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=auosm8mCULyafyny@devvm20253.cco0.facebook.com \
--to=joe@dama.to \
--cc=Frank.Li@nxp.com \
--cc=Frank.li@oss.nxp.com \
--cc=andre.przywara@arm.com \
--cc=andrew+netdev@lunn.ch \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=imx@lists.linux.dev \
--cc=jernej.skrabec@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=liyouhong@kylinos.cn \
--cc=loic.poulain@oss.qualcomm.com \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=phucduc.bui@gmail.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=ryazanov.s.a@gmail.com \
--cc=samuel@sholland.org \
--cc=stephan@gerhold.net \
--cc=vkoul@kernel.org \
--cc=wens@kernel.org \
--cc=yiconghui@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.