* [PATCH] spi: spi-dw-dma: fix print error log when wait finish transaction
@ 2026-03-02 11:32 Vladimir Yakovlev
2026-03-02 13:32 ` Mark Brown
2026-03-03 14:20 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Yakovlev @ 2026-03-02 11:32 UTC (permalink / raw)
To: Mark Brown; +Cc: Vladimir Yakovlev, linux-spi, linux-kernel
If an error occurs, the device may not have a current message. In this
case, the system will crash.
In this case, it's better to use dev from the struct host.
Signed-off-by: Vladimir Yakovlev <vovchkir@gmail.com>
---
drivers/spi/spi-dw-dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-dw-dma.c b/drivers/spi/spi-dw-dma.c
index 65adec7c7524..d83466166abe 100644
--- a/drivers/spi/spi-dw-dma.c
+++ b/drivers/spi/spi-dw-dma.c
@@ -271,7 +271,7 @@ static int dw_spi_dma_wait(struct dw_spi *dws, unsigned int len, u32 speed)
msecs_to_jiffies(ms));
if (ms == 0) {
- dev_err(&dws->ctlr->cur_msg->spi->dev,
+ dev_err(&dws->host->dev,
"DMA transaction timed out\n");
return -ETIMEDOUT;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] spi: spi-dw-dma: fix print error log when wait finish transaction
2026-03-02 11:32 [PATCH] spi: spi-dw-dma: fix print error log when wait finish transaction Vladimir Yakovlev
@ 2026-03-02 13:32 ` Mark Brown
2026-03-03 14:20 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-03-02 13:32 UTC (permalink / raw)
To: Vladimir Yakovlev; +Cc: linux-spi, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 953 bytes --]
On Mon, Mar 02, 2026 at 02:32:33PM +0300, Vladimir Yakovlev wrote:
> If an error occurs, the device may not have a current message. In this
> case, the system will crash.
>
> In this case, it's better to use dev from the struct host.
Are you sure:
/build/stage/linux/drivers/spi/spi-dw-dma.c: In function ‘dw_spi_dma_wait’:
/build/stage/linux/drivers/spi/spi-dw-dma.c:274:29: error: ‘struct dw_spi’ has no member named ‘host’
274 | dev_err(&dws->host->dev,
| ^~
/build/stage/linux/include/linux/dev_printk.h:110:25: note: in definition of macro ‘dev_printk_index_wrap’
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
/build/stage/linux/drivers/spi/spi-dw-dma.c:274:17: note: in expansion of macro ‘dev_err’
274 | dev_err(&dws->host->dev,
| ^~~~~~~
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] spi: spi-dw-dma: fix print error log when wait finish transaction
2026-03-02 11:32 [PATCH] spi: spi-dw-dma: fix print error log when wait finish transaction Vladimir Yakovlev
2026-03-02 13:32 ` Mark Brown
@ 2026-03-03 14:20 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-03-03 14:20 UTC (permalink / raw)
To: Vladimir Yakovlev; +Cc: linux-spi, linux-kernel
On Mon, 02 Mar 2026 14:32:33 +0300, Vladimir Yakovlev wrote:
> If an error occurs, the device may not have a current message. In this
> case, the system will crash.
>
> In this case, it's better to use dev from the struct host.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: spi-dw-dma: fix print error log when wait finish transaction
commit: 3b46d61890632c8f8b117147b6923bff4b42ccb7
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-03 14:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02 11:32 [PATCH] spi: spi-dw-dma: fix print error log when wait finish transaction Vladimir Yakovlev
2026-03-02 13:32 ` Mark Brown
2026-03-03 14:20 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox