* [PATCH 1/1] tty: replace chan->device->dev with dmaengine_get_provider_device()
@ 2026-11-03 21:59 Frank.Li
2026-11-03 22:04 ` sashiko-bot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Frank.Li @ 2026-11-03 21:59 UTC (permalink / raw)
To: Andy Shevchenko, Ilpo Järvinen, Greg Kroah-Hartman,
Jiri Slaby, Frank Li, Haoxiang Li, Zhaoyang Yu, John Ogness,
Mike Rapoport (Microsoft), open list:TTY LAYER AND SERIAL DRIVERS,
open list:TTY LAYER AND SERIAL DRIVERS
Cc: imx, vkoul
From: Frank Li <Frank.Li@nxp.com>
Use the dmaengine_get_provider_device() API instead of directly
accessing chan->device->dev to get the DMA provider device.
No functional change. Prepare make to struct dma_device private to the DMA
engine.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
drivers/tty/serial/8250/8250_dw.c | 2 +-
drivers/tty/serial/8250/8250_lpss.c | 2 +-
drivers/tty/serial/8250/8250_mid.c | 2 +-
drivers/tty/serial/pch_uart.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index eca02e8bd6d13..9adaf5b5fbd56 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -530,7 +530,7 @@ static bool dw8250_fallback_dma_filter(struct dma_chan *chan, void *param)
static bool dw8250_idma_filter(struct dma_chan *chan, void *param)
{
- return param == chan->device->dev;
+ return param == dmaengine_get_provider_device(chan);
}
static void dw8250_setup_dma_filter(struct uart_port *p, struct dw8250_data *data)
diff --git a/drivers/tty/serial/8250/8250_lpss.c b/drivers/tty/serial/8250/8250_lpss.c
index 7e88f2b793b5a..eed37e8b3e831 100644
--- a/drivers/tty/serial/8250/8250_lpss.c
+++ b/drivers/tty/serial/8250/8250_lpss.c
@@ -269,7 +269,7 @@ static bool lpss8250_dma_filter(struct dma_chan *chan, void *param)
{
struct dw_dma_slave *dws = param;
- if (dws->dma_dev != chan->device->dev)
+ if (dws->dma_dev != dmaengine_get_provider_device(chan))
return false;
chan->private = dws;
diff --git a/drivers/tty/serial/8250/8250_mid.c b/drivers/tty/serial/8250/8250_mid.c
index 44b43163df511..dfd2460983fab 100644
--- a/drivers/tty/serial/8250/8250_mid.c
+++ b/drivers/tty/serial/8250/8250_mid.c
@@ -252,7 +252,7 @@ static bool mid8250_dma_filter(struct dma_chan *chan, void *param)
{
struct hsu_dma_slave *s = param;
- if (s->dma_dev != chan->device->dev || s->chan_id != chan->chan_id)
+ if (s->dma_dev != dmaengine_get_provider_device(chan) || s->chan_id != chan->chan_id)
return false;
chan->private = s;
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index 9505d255f09c5..6d9a88149b407 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -656,7 +656,7 @@ static bool filter(struct dma_chan *chan, void *slave)
struct pch_dma_slave *param = slave;
if ((chan->chan_id == param->chan_id) && (param->dma_dev ==
- chan->device->dev)) {
+ dmaengine_get_provider_device(chan))) {
chan->private = param;
return true;
} else {
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 1/1] tty: replace chan->device->dev with dmaengine_get_provider_device()
2026-11-03 21:59 [PATCH 1/1] tty: replace chan->device->dev with dmaengine_get_provider_device() Frank.Li
@ 2026-11-03 22:04 ` sashiko-bot
2026-11-03 22:54 ` Ilpo Järvinen
2026-11-04 8:47 ` Andy Shevchenko
2 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-03 22:04 UTC (permalink / raw)
To: Frank.Li, open list:TTY LAYER AND SERIAL DRIVERS
> From: Frank Li <Frank.Li@nxp.com>
>
> Use the dmaengine_get_provider_device() API instead of directly
> accessing chan->device->dev to get the DMA provider device.
>
> No functional change. Prepare make to struct dma_device private to the DMA
> engine.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103215949.1827937-1-Frank.Li@oss.nxp.com?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] tty: replace chan->device->dev with dmaengine_get_provider_device()
2026-11-03 21:59 [PATCH 1/1] tty: replace chan->device->dev with dmaengine_get_provider_device() Frank.Li
2026-11-03 22:04 ` sashiko-bot
@ 2026-11-03 22:54 ` Ilpo Järvinen
2026-11-04 8:47 ` Andy Shevchenko
2 siblings, 0 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2026-11-03 22:54 UTC (permalink / raw)
To: Frank.Li
Cc: Andy Shevchenko, Greg Kroah-Hartman, Jiri Slaby, Frank Li,
Haoxiang Li, Zhaoyang Yu, John Ogness, Mike Rapoport (Microsoft),
open list:TTY LAYER AND SERIAL DRIVERS,
open list:TTY LAYER AND SERIAL DRIVERS, imx, vkoul
On Tue, 3 Nov 2026, Frank.Li@oss.nxp.com wrote:
> From: Frank Li <Frank.Li@nxp.com>
>
> Use the dmaengine_get_provider_device() API instead of directly
> accessing chan->device->dev to get the DMA provider device.
>
> No functional change. Prepare make to struct dma_device private to the DMA
> engine.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> drivers/tty/serial/8250/8250_dw.c | 2 +-
> drivers/tty/serial/8250/8250_lpss.c | 2 +-
> drivers/tty/serial/8250/8250_mid.c | 2 +-
> drivers/tty/serial/pch_uart.c | 2 +-
Please split to 8250 and pch_uart.
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
> index eca02e8bd6d13..9adaf5b5fbd56 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -530,7 +530,7 @@ static bool dw8250_fallback_dma_filter(struct dma_chan *chan, void *param)
>
> static bool dw8250_idma_filter(struct dma_chan *chan, void *param)
> {
> - return param == chan->device->dev;
> + return param == dmaengine_get_provider_device(chan);
> }
>
> static void dw8250_setup_dma_filter(struct uart_port *p, struct dw8250_data *data)
> diff --git a/drivers/tty/serial/8250/8250_lpss.c b/drivers/tty/serial/8250/8250_lpss.c
> index 7e88f2b793b5a..eed37e8b3e831 100644
> --- a/drivers/tty/serial/8250/8250_lpss.c
> +++ b/drivers/tty/serial/8250/8250_lpss.c
> @@ -269,7 +269,7 @@ static bool lpss8250_dma_filter(struct dma_chan *chan, void *param)
> {
> struct dw_dma_slave *dws = param;
>
> - if (dws->dma_dev != chan->device->dev)
> + if (dws->dma_dev != dmaengine_get_provider_device(chan))
> return false;
>
> chan->private = dws;
> diff --git a/drivers/tty/serial/8250/8250_mid.c b/drivers/tty/serial/8250/8250_mid.c
> index 44b43163df511..dfd2460983fab 100644
> --- a/drivers/tty/serial/8250/8250_mid.c
> +++ b/drivers/tty/serial/8250/8250_mid.c
> @@ -252,7 +252,7 @@ static bool mid8250_dma_filter(struct dma_chan *chan, void *param)
> {
> struct hsu_dma_slave *s = param;
>
> - if (s->dma_dev != chan->device->dev || s->chan_id != chan->chan_id)
> + if (s->dma_dev != dmaengine_get_provider_device(chan) || s->chan_id != chan->chan_id)
> return false;
>
> chan->private = s;
> diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
> index 9505d255f09c5..6d9a88149b407 100644
> --- a/drivers/tty/serial/pch_uart.c
> +++ b/drivers/tty/serial/pch_uart.c
> @@ -656,7 +656,7 @@ static bool filter(struct dma_chan *chan, void *slave)
> struct pch_dma_slave *param = slave;
>
> if ((chan->chan_id == param->chan_id) && (param->dma_dev ==
> - chan->device->dev)) {
> + dmaengine_get_provider_device(chan))) {
Did you even read this patch yourself? Probably not... :-(
The line should be (very obviously) split at &&
--
i.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/1] tty: replace chan->device->dev with dmaengine_get_provider_device()
2026-11-03 21:59 [PATCH 1/1] tty: replace chan->device->dev with dmaengine_get_provider_device() Frank.Li
2026-11-03 22:04 ` sashiko-bot
2026-11-03 22:54 ` Ilpo Järvinen
@ 2026-11-04 8:47 ` Andy Shevchenko
2 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-11-04 8:47 UTC (permalink / raw)
To: Frank.Li
Cc: Ilpo Järvinen, Greg Kroah-Hartman, Jiri Slaby, Frank Li,
Haoxiang Li, Zhaoyang Yu, John Ogness, Mike Rapoport (Microsoft),
open list:TTY LAYER AND SERIAL DRIVERS,
open list:TTY LAYER AND SERIAL DRIVERS, imx, vkoul
On Tue, Nov 03, 2026 at 04:59:45PM -0500, Frank.Li@oss.nxp.com wrote:
>
> Use the dmaengine_get_provider_device() API instead of directly
> accessing chan->device->dev to get the DMA provider device.
>
> No functional change. Prepare make to struct dma_device private to the DMA
> engine.
...
> static bool dw8250_idma_filter(struct dma_chan *chan, void *param)
> {
> - return param == chan->device->dev;
> + return param == dmaengine_get_provider_device(chan);
> }
As mentioned in SPI patch, with another helper this function will gone.
...
> if ((chan->chan_id == param->chan_id) && (param->dma_dev ==
> - chan->device->dev)) {
> + dmaengine_get_provider_device(chan))) {
Fix indentation while at it.
if ((chan->chan_id == param->chan_id) &&
(param->dma_dev == dmaengine_get_provider_device(chan))) {
> chan->private = param;
> return true;
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-04 8:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 21:59 [PATCH 1/1] tty: replace chan->device->dev with dmaengine_get_provider_device() Frank.Li
2026-11-03 22:04 ` sashiko-bot
2026-11-03 22:54 ` Ilpo Järvinen
2026-11-04 8:47 ` Andy Shevchenko
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.