From: Matthew Wilcox <matthew@wil.cx>
To: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Cc: jbarnes@virtuousgeek.org, linux-kernel@vger.kernel.org,
linux-pci@atrey.karlin.mff.cuni.cz, grundler@parisc-linux.org
Subject: Re: [patch v3] doc: DMA-mapping.txt has undeclared variables [Bug 10397]
Date: Mon, 28 Apr 2008 07:05:32 -0600 [thread overview]
Message-ID: <20080428130532.GU14990@parisc-linux.org> (raw)
In-Reply-To: <987999.8753.qm@web52011.mail.re2.yahoo.com>
On Mon, Apr 28, 2008 at 05:58:49AM -0700, Matti Linnanvuori wrote:
> From: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
>
> Consistently use pdev as the variable of type struct pci_dev *.
> Update DMA mapping documentation to use 'pdev' rather than 'dev' in
> example code that calls routines expecting 'struct pci_device *', since 'dev'
> might make readers think they're passing 'struct device *' parameters.
> Bug 10397.
>
> Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Acked-by: Matthew Wilcox <willy@linux.intel.com>
> - cpu_addr = pci_alloc_consistent(dev, size, &dma_handle);
> + cpu_addr = pci_alloc_consistent(pdev, size, &dma_handle);
>
> -where dev is a struct pci_dev *. You should pass NULL for PCI like buses
> +where pdev is a struct pci_dev *. You should pass NULL for PCI like buses
> where devices don't have struct pci_dev (like ISA, EISA). This may be
> called in interrupt context.
The second sentence is misleading (but it's unrelated to this patch).
If you don't have a pdev, you should be using dma_alloc_coherent()
instead (see DMA-API.txt). Want to make another patch? ;-)
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2008-04-28 13:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 12:58 [patch v3] doc: DMA-mapping.txt has undeclared variables [Bug 10397] Matti Linnanvuori
2008-04-28 13:05 ` Matthew Wilcox [this message]
2008-04-28 15:33 ` Jesse Barnes
2008-04-30 0:37 ` Grant Grundler
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=20080428130532.GU14990@parisc-linux.org \
--to=matthew@wil.cx \
--cc=grundler@parisc-linux.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=mattilinnanvuori@yahoo.com \
/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