From: Frank Li <Frank.li@oss.nxp.com>
To: Michal Pecio <michal.pecio@gmail.com>
Cc: frank.li@nxp.com, corbet@lwn.net, dmaengine@vger.kernel.org,
hch@infradead.org, imx@lists.linux.dev,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, lizhijian@fujitsu.com, mst@redhat.com,
rdunlap@infradead.org
Subject: Re: [PATCH v2 1/1] docs: dma: correct dma_set_mask() sample code
Date: Mon, 17 Aug 2026 13:43:02 -0500 [thread overview]
Message-ID: <aoNWNkAhUZi6_pgH@SMW015318> (raw)
In-Reply-To: <20260817191731.104171a3.michal.pecio@gmail.com>
On Mon, Aug 17, 2026 at 07:17:31PM +0200, Michal Pecio wrote:
> [You don't often get email from michal.pecio@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> 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).
Now, prefer don't check when >= 32 to keep code clean.
Frank
>
> Regards,
> Michal
prev parent reply other threads:[~2026-08-17 18:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-01 17:41 [PATCH v2 1/1] docs: dma: correct dma_set_mask() sample code Frank Li
2024-04-02 15:09 ` Christoph Hellwig
2024-04-02 15:11 ` Jonathan Corbet
2024-04-02 15:43 ` Niklas Cassel
2024-04-02 16:08 ` Jonathan Corbet
2026-08-16 5:10 ` Michal Pecio
2026-08-17 15:50 ` Frank Li
2026-08-17 17:17 ` Michal Pecio
2026-08-17 18:43 ` Frank Li [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aoNWNkAhUZi6_pgH@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=corbet@lwn.net \
--cc=dmaengine@vger.kernel.org \
--cc=frank.li@nxp.com \
--cc=hch@infradead.org \
--cc=imx@lists.linux.dev \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lizhijian@fujitsu.com \
--cc=michal.pecio@gmail.com \
--cc=mst@redhat.com \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox