[Top] [All Lists]

Re: [PATCH] IOC3: Switch to pci refcounting safe APIs

To: Sergei Shtylyov <>
Subject: Re: [PATCH] IOC3: Switch to pci refcounting safe APIs
From: Alan Cox <>
Date: Mon, 23 Apr 2007 15:19:18 +0100
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
> > +static int ioc3_adjacent_is_ioc3(struct pci_dev *pdev, int dev)
> > +{
> > +   struct pci_dev *dev = pci_get_bus_and_slot(pdev->bus->number, 
> > +                                                   PCI_DEVFN(dev, 0));
>    The same question: isn't pci_get_bus() better in this case?

Makes no real difference, but if you know the MIPS tree never ends up
with pdev->bus = NULL for the root bus then its a trivial change

>    I don't see the point of using refcounting API in such cases but well...

Two reasons

1.      It makes the entire system more consistent
2.      It means we can remove the (usually) unsafe pci_find_slot API

(and #3 sort of... it means the pci fake hotplug testing works with this
device too)

<Prev in Thread] Current Thread [Next in Thread>