public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Chiang <achiang@hp.com>
To: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: jbarnes@virtuousgeek.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, lenb@kernel.org
Subject: Re: [PATCH 3/3] PCI: pci_slot: grab refcount on slot's bus
Date: Mon, 30 Mar 2009 10:45:42 -0600	[thread overview]
Message-ID: <20090330164542.GC30433@ldl.fc.hp.com> (raw)
In-Reply-To: <49D02DAD.2040607@jp.fujitsu.com>

* Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:
> Alex Chiang wrote:
> > diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
> > index cd1f446..c7ad9f2 100644
> > --- a/drivers/acpi/pci_slot.c
> > +++ b/drivers/acpi/pci_slot.c
> > @@ -63,6 +63,7 @@ struct acpi_pci_slot {
> >  	acpi_handle root_handle;	/* handle of the root bridge */
> >  	struct pci_slot *pci_slot;	/* corresponding pci_slot */
> >  	struct list_head list;		/* node in the list of slots */
> > +	struct pci_bus *bus;		/* bus the slot is on */
> >  };
> 
> I don't think we need an additional 'bus' field in the struct
> acpi_pci_slot. At the register_slot(), we already know the
> address of struct pci_bus. At the acpi_pci_slot_remove(), I
> think we can get the address of struct pci_bus as follows.
> 
> 		if (slot->root_handle == handle) {
> 			struct pci_bus *pbus = slot->pci_slot->bus;
> 			list_del(&slot->list);
> 			pci_destroy_slot(slot->pci_slot);
> 			put_device(&pbus->dev);
> 			kfree(slot);
> 		}

Ok, that is a little cleaner, I'll do it your way.

Thanks for the review.

/ac


      reply	other threads:[~2009-03-30 16:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-29 16:54 [PATCH 0/3] PCI core logical hotplug cleanup Alex Chiang
2009-03-29 16:54 ` [PATCH 1/3] PCI: allow PCI core hotplug to remove PCI root bus Alex Chiang
2009-03-30  2:14   ` Kenji Kaneshige
2009-03-30 16:41     ` Alex Chiang
2009-03-29 16:54 ` [PATCH 2/3] PCI Hotplug: acpiphp: grab refcount on p2p subordinate bus Alex Chiang
2009-03-29 16:54 ` [PATCH 3/3] PCI: pci_slot: grab refcount on slot's bus Alex Chiang
2009-03-30  2:25   ` Kenji Kaneshige
2009-03-30 16:45     ` Alex Chiang [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=20090330164542.GC30433@ldl.fc.hp.com \
    --to=achiang@hp.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox