All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Amelie Delaunay <amelie.delaunay@foss.st.com>
Cc: Frank.Li@oss.nxp.com, "Jacky Huang" <ychuang3@nuvoton.com>,
	"Shan-Chun Hung" <schung@nuvoton.com>,
	"Frank Li" <Frank.Li@kernel.org>,
	"Paul Cercueil" <paul@crapouillou.net>,
	"Eugeniy Paltsev" <Eugeniy.Paltsev@synopsys.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Binbin Zhou" <zhoubinbin@loongson.cn>,
	"Patrice Chotard" <patrice.chotard@foss.st.com>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Masami Hiramatsu" <mhiramat@kernel.org>,
	"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
	"Thierry Reding" <thierry.reding@kernel.org>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Ludovic Desroches" <ludovic.desroches@microchip.com>,
	"Viresh Kumar" <vireshk@kernel.org>,
	"Keguang Zhang" <keguang.zhang@gmail.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Daniel Mack" <daniel@zonque.org>,
	"Haojian Zhuang" <haojian.zhuang@gmail.com>,
	"Robert Jarzmik" <robert.jarzmik@free.fr>,
	"Chen-Yu Tsai" <wens@kernel.org>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Samuel Holland" <samuel@sholland.org>,
	"Kelvin Cao" <kelvin.cao@microchip.com>,
	"Logan Gunthorpe" <logang@deltatee.com>,
	"Laxman Dewangan" <ldewangan@nvidia.com>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-trace-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-actions@lists.infradead.org, linux-sunxi@lists.linux.dev,
	imx@lists.linux.dev, "Frank Li" <Frank.Li@nxp.com>
Subject: Re: [PATCH v3 3/4] dmaengine: add (dmaengine|vchan)_chan_dev() helper
Date: Wed, 9 Sep 2026 18:09:54 +0530	[thread overview]
Message-ID: <aqFTmjUCysJWmy-P@parshuram> (raw)
In-Reply-To: <c79f42cf-43c4-4b5a-a6da-217052d40284@foss.st.com>

On 07-09-26, 10:55, Amelie Delaunay wrote:
> Hi Frank,
> 
> On 9/4/26 23:49, Frank.Li@oss.nxp.com wrote:
> [...]
> 
> I don't think removing chan2dev() function from the STM32 DMA drivers is an
> improvement, since the parameter is a `stm32` chan, not a `dma_chan`.
> chan2dev() was meant to expose the channel device behind the `stm32` wrapper
> and keep logging concise.
> 
> > diff --git a/drivers/dma/stm32/stm32-dma.c b/drivers/dma/stm32/stm32-dma.c
> > index 3e8151e2ad75a..4688cebaf7f7a 100644
> > --- a/drivers/dma/stm32/stm32-dma.c
> > +++ b/drivers/dma/stm32/stm32-dma.c
> > @@ -248,11 +248,6 @@ static struct stm32_dma_desc *to_stm32_dma_desc(struct virt_dma_desc *vdesc)
> >   	return container_of(vdesc, struct stm32_dma_desc, vdesc);
> >   }
> > -static struct device *chan2dev(struct stm32_dma_chan *chan)
> > -{
> > -	return &chan->vchan.chan.dev->device;
> > -}
> > -
> 
> I would rather keep it as:
> 
> static struct device *chan2dev(struct stm32_dma_chan *chan)
> {
> 	return vchan_chan_dev(&chan->vchan);
> }
> 
> and then drop all further updates.

I would say better to use a common macro than keep one for yours

-- 
~Vinod

  reply	other threads:[~2026-09-09 12:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 21:49 [PATCH v3 0/4] dmaengine: rename dma_chan::dev to dma_chan::chan_dev for clarity Frank.Li
2026-09-04 21:49 ` [PATCH v3 1/4] dmaengine: vchan: add vchan_chan_name() to get channel device name Frank.Li
2026-09-04 22:04   ` sashiko-bot
2026-09-07  9:00   ` Amelie Delaunay
2026-09-04 21:49 ` [PATCH v3 2/4] dmaengine: use dma_chan_name() helper to get per-channel " Frank.Li
2026-09-04 21:58   ` sashiko-bot
2026-09-05  7:55   ` Andy Shevchenko
2026-09-07  9:01   ` Amelie Delaunay
2026-09-04 21:49 ` [PATCH v3 3/4] dmaengine: add (dmaengine|vchan)_chan_dev() helper Frank.Li
2026-09-04 22:02   ` sashiko-bot
2026-09-07  8:55   ` Amelie Delaunay
2026-09-09 12:39     ` Vinod Koul [this message]
2026-09-04 21:49 ` [PATCH v3 4/4] dmaengine: add union chan_dev for dma_chan::dev for clarity Frank.Li
2026-09-04 22:01   ` sashiko-bot
2026-09-05  7:59   ` Andy Shevchenko
2026-09-05  8:00 ` [PATCH v3 0/4] dmaengine: rename dma_chan::dev to dma_chan::chan_dev " Andy Shevchenko

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=aqFTmjUCysJWmy-P@parshuram \
    --to=vkoul@kernel.org \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=Frank.Li@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=Frank.Li@oss.nxp.com \
    --cc=afaerber@suse.de \
    --cc=alexandre.torgue@foss.st.com \
    --cc=amelie.delaunay@foss.st.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=daniel@zonque.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=keguang.zhang@gmail.com \
    --cc=kelvin.cao@microchip.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-actions@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=ludovic.desroches@microchip.com \
    --cc=mani@kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mhiramat@kernel.org \
    --cc=patrice.chotard@foss.st.com \
    --cc=paul@crapouillou.net \
    --cc=robert.jarzmik@free.fr \
    --cc=rostedt@goodmis.org \
    --cc=samuel@sholland.org \
    --cc=schung@nuvoton.com \
    --cc=thierry.reding@kernel.org \
    --cc=vigneshr@ti.com \
    --cc=vireshk@kernel.org \
    --cc=wens@kernel.org \
    --cc=ychuang3@nuvoton.com \
    --cc=zhoubinbin@loongson.cn \
    /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.