From: Christoph Hellwig <hch@infradead.org>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH 2.6.11-rc2 1/3] altix: pci dma abstraction
Date: Mon, 07 Feb 2005 10:09:05 +0000 [thread overview]
Message-ID: <20050207100905.GB11949@infradead.org> (raw)
In-Reply-To: <20050204213203.16671.94089.90028@attica.americas.sgi.com>
On Sun, Feb 06, 2005 at 04:28:10PM +0000, Matthew Wilcox wrote:
> On Fri, Feb 04, 2005 at 03:32:03PM -0600, Mark Maule wrote:
> > @@ -79,7 +78,7 @@
> > {
> > void *cpuaddr;
> > unsigned long phys_addr;
> > - struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(to_pci_dev(dev));
> > + struct pci_dev *pdev = to_pci_dev(dev);
> >
> > BUG_ON(dev->bus != &pci_bus_type);
> >
> > @@ -102,8 +101,7 @@
> > * resources.
> > */
> >
> > - *dma_handle = pcibr_dma_map(pcidev_info, phys_addr, size,
> > - SN_PCIDMA_CONSISTENT);
> > + *dma_handle = (*SN_PCIDEV_BUSPROVIDER(pdev)->dma_map_consistent) (pdev, phys_addr, size);
> > if (!*dma_handle) {
> > printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__);
> > free_pages((unsigned long)cpuaddr, get_order(size));
>
> I think this bit would be done better as ...
>
> struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev);
> [...]
> *dma_handle = provider->dma_map_consistent(pdev, phys_addr, size);
>
> Looks neater and reduces line length.
Seconded. It's the way we do it in Linux all over the place, too
next prev parent reply other threads:[~2005-02-07 10:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-04 21:32 [PATCH 2.6.11-rc2 1/3] altix: pci dma abstraction Mark Maule
2005-02-06 16:28 ` Matthew Wilcox
2005-02-07 10:09 ` Christoph Hellwig [this message]
2005-02-07 16:22 ` Mark Maule
2005-02-08 0:08 ` Mark Maule
2005-03-10 21:55 ` Mark Maule
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=20050207100905.GB11949@infradead.org \
--to=hch@infradead.org \
--cc=linux-ia64@vger.kernel.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