Re: [PATCH] dma-mapping: don't trace the DMA address when the allocation fails
From: Donggeun Yoo
Date: Mon Sep 07 2026 - 08:14:56 EST
On Mon, Sep 07, 2026 at 01:05:20PM +0200, Marek Szyprowski wrote:
> Frankly speaking I would prefer to fix this in include/trace/events/dma.h with
> __entry->dma_addr = virt_addr ? dma_addr : 0;
Agreed, that is better. It also covers dma_alloc_pages() and
dma_alloc_sgt_err(), which share dma_alloc_class, and any caller added
later.
> Here You remove the debug_dma_alloc call for the failed case. Right, it
> is a noop now for the allocation failure, but it might be extended with
> some kind of debugging in the future, so I prefer to keep the current
> code here.
Fair enough. kernel/dma/mapping.c is untouched in v2.
include/trace/events/dma.h is not covered by the DMA MAINTAINERS entry,
only by TRACING, so v2 has Steven and Masami on To as well.
v2, tested this time rather than compile-tested only:
https://lore.kernel.org/linux-iommu/20260907120124.603373-1-donggeunyoo.kernel@xxxxxxxxx/