Re: [PATCH v2 1/1] docs: dma: correct dma_set_mask() sample code

Michal Pecio <[email protected]>
Newsgroups org.kernel.vger.linux-pci,dev.linux.lists.imx,org.kernel.vger.dmaengine,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Mon, 17 Aug 2026 10:50:35 -0500, Frank Li wrote:
> On Sun, Aug 16, 2026 at 07:10:44AM +0200, Michal Pecio wrote:
> > No realistic chance of the dev->dma_mask check (below) giving -EIO?  
> 
> dma_mask is pointer, which already initilized by bus driver before
> call to probe.
> 
> For example
> 
> https://elixir.bootlin.com/linux/v7.1.8/source/drivers/base/platform.c#L634
> 
> If you find one, which bus driver have not init it, please high light
> it.
>
> > > dma_supported() will call dma_direct_supported or iommux's
> > > dma_supported call back function.  
> >
> > Aapparently, it may also use some 'dma_map_ops' and there is a bunch
> > of those spread over drivers/ and arch/. But I gather they are
> > expected to behave similarly as the functions named above?  
> 
> I grep it and checked at that time, all return 1 when >= 32. Now more
> powerfull check tools avaible, you can double check it.

Thank you. Sounds like it should work then, though I think that
checking return status won't harm, just to cover unusual cases like
regression in some obscure arch or people with buggy out of tree
patches (which they "forget" to mention they are using).

Regards,
Michal
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.