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
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to