Re: [PATCH] ASoC: soc-generic-dmaengine: report DMA channel request failures more clearly
From: Bui Duc Phuc
Date: Wed Jul 29 2026 - 22:54:10 EST
Hi Mark,
Thank you for you review.
> > + if (device_property_match_string(dev, "dma-names", name) >= 0)
> > + dev_warn(dev, "dma-names has '%s' but request failed (%ld)\n",
> > + name, PTR_ERR(chan));
> > +
>
> This is going to generate warnings for unidirectional PCMs, if we don't
> pass a name for a direction then a default will be provided and we'll
> try to look it up even if it shouldn't exist.
In my understanding device_property_match_string() will return a
negative error code
if the missing direction's default name isn't listed in "dma-names".
Since dev_warn() only triggers on >=0, it shouldn't produce false warnings for
unidirectional PCMs.
I may be missing something here. Could you help clarify if there's a
specific case
where this would still trigger?
I had already sent v3 before seeing your review.
https://lore.kernel.org/all/20260720064131.75156-1-phucduc.bui@xxxxxxxxx/
If my understanding is incorrect, I'll address this in the next revision.
Best regards,
Phuc