All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>, linux-mips@linux-mips.org
Subject: Re: [PATCH] IOC3: Switch to pci refcounting safe APIs
Date: Mon, 23 Apr 2007 15:35:07 +0100	[thread overview]
Message-ID: <20070423143507.GA8877@linux-mips.org> (raw)
In-Reply-To: <20070423151918.477ffb6a@the-village.bc.nu>

On Mon, Apr 23, 2007 at 03:19:18PM +0100, Alan Cox wrote:

> > > +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

That's the case on MIPS.

> >    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)

The patch looks ok to me:

Acked-by: Ralf Baechle <ralf@linux-mips.org>

Longer term MENET should be handled differently but this patch certainly
doesn't make things worse.

  Ralf

  parent reply	other threads:[~2007-04-23 14:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-23 14:06 [PATCH] IOC3: Switch to pci refcounting safe APIs Alan Cox
2007-04-23 14:09 ` Sergei Shtylyov
2007-04-23 14:19   ` Alan Cox
2007-04-23 14:21     ` Sergei Shtylyov
2007-04-23 14:35     ` Ralf Baechle [this message]
2007-04-23 15:18       ` Alan Cox

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=20070423143507.GA8877@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-mips@linux-mips.org \
    --cc=sshtylyov@ru.mvista.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.