Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] media: Use devm_of_reserved_mem_device_init()
@ 2026-09-02 20:06 Mukesh Ojha
  2026-09-02 20:06 ` [PATCH v2 1/6] media: synopsys: hdmirx: " Mukesh Ojha
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Mukesh Ojha @ 2026-09-02 20:06 UTC (permalink / raw)
  To: Daniel Scally, Jacopo Mondi, Mauro Carvalho Chehab, Eddie James,
	Joel Stanley, Andrew Jeffery, Minghsiu Tsai, Houlong Wei,
	Andrew-CT Chen, Tiffany Lin, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Joseph Liu, Marvin Lin,
	Dmitry Osipenko, Maxime Ripard, Paul Kocialkowski,
	Greg Kroah-Hartman, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Ryan Chen, Billy Tsai, linux-media, linux-kernel, openbmc,
	linux-arm-kernel, linux-aspeed, linux-mediatek, kernel,
	linux-staging, linux-sunxi, Mukesh Ojha

Several media drivers manually manage reserved memory lifetime by calling
of_reserved_mem_device_init() in probe and of_reserved_mem_device_release()
in remove. Drivers that fail to release on every error path between the two
calls leak the reserved memory region until the driver is unloaded.

devm_of_reserved_mem_device_init() was recently introduced to tie the
release to the device's devres lifetime automatically. Convert the affected
media drivers to use it, removing the manual release calls and any wrapper
devres actions.

Changes since v1: https://lore.kernel.org/lkml/20260703193855.110619-2-mukesh.ojha@oss.qualcomm.com/
 - Carried R-b tag if any.
 - Rebased it.

Mukesh Ojha (6):
  media: synopsys: hdmirx: Use devm_of_reserved_mem_device_init()
  media: aspeed: Use devm_of_reserved_mem_device_init()
  media: nuvoton: npcm-video: Use devm_of_reserved_mem_device_init()
  media: arm: mali-c55: Use devm_of_reserved_mem_device_init()
  media: mediatek: vpu: Use devm_of_reserved_mem_device_init()
  staging: media: cedrus: Use devm_of_reserved_mem_device_init()

 .../media/platform/arm/mali-c55/mali-c55-core.c  | 12 +++---------
 drivers/media/platform/aspeed/aspeed-video.c     | 12 ++++--------
 drivers/media/platform/mediatek/vpu/mtk_vpu.c    |  3 +--
 drivers/media/platform/nuvoton/npcm-video.c      |  9 ++-------
 .../media/platform/synopsys/hdmirx/snps_hdmirx.c | 16 ++--------------
 drivers/staging/media/sunxi/cedrus/cedrus_hw.c   |  9 ++-------
 6 files changed, 14 insertions(+), 47 deletions(-)

-- 
2.55.0



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

end of thread, other threads:[~2026-09-03  3:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 20:06 [PATCH v2 0/6] media: Use devm_of_reserved_mem_device_init() Mukesh Ojha
2026-09-02 20:06 ` [PATCH v2 1/6] media: synopsys: hdmirx: " Mukesh Ojha
2026-09-02 20:06 ` [PATCH v2 2/6] media: aspeed: " Mukesh Ojha
2026-09-02 20:07 ` [PATCH v2 3/6] media: nuvoton: npcm-video: " Mukesh Ojha
2026-09-02 20:07 ` [PATCH v2 4/6] media: arm: mali-c55: " Mukesh Ojha
2026-09-02 20:07 ` [PATCH v2 5/6] media: mediatek: vpu: " Mukesh Ojha
2026-09-03  3:08   ` Chen-Yu Tsai
2026-09-02 20:07 ` [PATCH v2 6/6] staging: media: cedrus: " Mukesh Ojha

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