DMA Engine development
 help / color / mirror / Atom feed
* [PATCH 0/2] dmaengine: fix dead empty checks in mpc512x and rz-dmac
@ 2026-05-21 14:47 Maoyi Xie
  2026-05-21 14:47 ` [PATCH 1/2] dmaengine: mpc512x: fix dead empty check in mpc_dma_prep_slave_sg() Maoyi Xie
  2026-05-21 14:47 ` [PATCH 2/2] dmaengine: rz-dmac: fix dead empty check in rz_dmac_chan_get_residue() Maoyi Xie
  0 siblings, 2 replies; 10+ messages in thread
From: Maoyi Xie @ 2026-05-21 14:47 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Frank Li, Geert Uytterhoeven, dmaengine, linux-renesas-soc,
	linux-kernel

Two dmaengine drivers use list_first_entry() and then test the
returned pointer against NULL. list_first_entry() never returns
NULL, so the NULL check is dead code. The author intent at both
sites was clear from the existing recovery path. Switch to
list_first_entry_or_null() so the existing NULL path runs.

The two sites were raised in an inquiry on 2026-05-20. Frank Li
confirmed and asked for a patch.

Maoyi Xie (2):
  dmaengine: mpc512x: fix dead empty check in mpc_dma_prep_slave_sg()
  dmaengine: rz-dmac: fix dead empty check in rz_dmac_chan_get_residue()

 drivers/dma/mpc512x_dma.c | 4 ++--
 drivers/dma/sh/rz-dmac.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

--
2.34.1

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-05-22 15:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21 14:47 [PATCH 0/2] dmaengine: fix dead empty checks in mpc512x and rz-dmac Maoyi Xie
2026-05-21 14:47 ` [PATCH 1/2] dmaengine: mpc512x: fix dead empty check in mpc_dma_prep_slave_sg() Maoyi Xie
2026-05-21 15:42   ` sashiko-bot
2026-05-21 16:30   ` Frank Li
2026-05-22 15:02   ` [PATCH v2] " Maoyi Xie
2026-05-22 15:23     ` sashiko-bot
2026-05-21 14:47 ` [PATCH 2/2] dmaengine: rz-dmac: fix dead empty check in rz_dmac_chan_get_residue() Maoyi Xie
2026-05-21 16:05   ` sashiko-bot
2026-05-22  8:16   ` Geert Uytterhoeven
2026-05-22  8:37     ` Maoyi Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox