Re: [PATCH] ASoC: soc-generic-dmaengine: report DMA channel request failures more clearly

Bui Duc Phuc <[email protected]>
Newsgroups org.kernel.vger.linux-sound,org.kernel.vger.linux-kernel
Message-ID <CAABR9nFZhuz4dsMoy_wk_tf4CS1SDAyfaJHba=vbhfJyLJT=pw@mail.gmail.com>
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/[email protected]/
If my understanding is incorrect, I'll address this in the next revision.

Best regards,
Phuc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.