All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: Fix device node for virtual bus
Date: Thu, 20 Nov 2014 16:11:35 -0700	[thread overview]
Message-ID: <20141120231135.GE7987@google.com> (raw)
In-Reply-To: <1415760163-12517-1-git-send-email-gwshan@linux.vnet.ibm.com>

On Wed, Nov 12, 2014 at 01:42:43PM +1100, Gavin Shan wrote:
> pci_set_bus_of_node() sets virtual PCI bus's device node to PHB's
> device node wrongly. The patch fixes the issue.
> 
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>

Applied to pci/misc for v3.19, thanks!

Thanks for explaining this to me.  It seems obvious now that I look at the
code.

> ---
>  drivers/pci/of.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/of.c b/drivers/pci/of.c
> index f092993..7b2256b 100644
> --- a/drivers/pci/of.c
> +++ b/drivers/pci/of.c
> @@ -31,9 +31,9 @@ void pci_release_of_node(struct pci_dev *dev)
>  
>  void pci_set_bus_of_node(struct pci_bus *bus)
>  {
> -	if (bus->self == NULL)
> +	if (pci_is_root_bus(bus))
>  		bus->dev.of_node = pcibios_get_phb_of_node(bus);
> -	else
> +	else if (bus->self)
>  		bus->dev.of_node = of_node_get(bus->self->dev.of_node);
>  }
>  
> -- 
> 1.8.3.2
> 

      parent reply	other threads:[~2014-11-20 23:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12  2:42 [PATCH] PCI: Fix device node for virtual bus Gavin Shan
2014-11-12  2:55 ` Bjorn Helgaas
2014-11-12  3:11   ` Gavin Shan
2014-11-12  4:08     ` Bjorn Helgaas
2014-11-12  5:24       ` Gavin Shan
2014-11-12 19:02         ` Bjorn Helgaas
2014-11-13  0:45           ` Gavin Shan
2014-11-20 23:11 ` Bjorn Helgaas [this message]

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=20141120231135.GE7987@google.com \
    --to=bhelgaas@google.com \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=linux-pci@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 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.