Re: [PATCH] dma-mapping: don't trace the DMA address when the allocation fails
From: Donggeun Yoo
Date: Sat Sep 05 2026 - 15:19:03 EST
On 9/5/26 14:37, Sean Anderson wrote:
> Ah, I see what you mean. TBH I would just do something like
>
> cpu_handle ? *dma_handle : NULL
>
> to make it clear what we're doing
It would have to be 0, dma_handle being a dma_addr_t, and
debug_dma_alloc_coherent() reads *dma_handle too -- it drops the value
when virt is NULL, but the read is still there -- so the conditional ends
up written three times.
68b6dbf1f441 gave dma_alloc_pages() and dma_alloc_noncontiguous() the
if/else split rather than a guarded argument, and I kept dma_alloc_attrs()
in that shape so that the three read the same way.
I don't feel strongly about it. Say the word and I'll respin with the
conditional inline.