Message ID | 1344355862-2726-3-git-send-email-jiang.liu@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
On Tue, Aug 7, 2012 at 10:10 AM, Jiang Liu <liuj97@gmail.com> wrote: > Trivial cleanups for drivers/pci/remove.c: > 1) move the comment for pci_stop_and_remove_bus_device() to the right place > 2) rename __pci_remove_behind_bridge() to pci_remove_behind_bridge() This seems fine, but I think my pci/bjorn-cleanup-remove branch subsumes it. > Signed-off-by: Jiang Liu <liuj97@gmail.com> > --- > drivers/pci/remove.c | 33 +++++++++++++++++---------------- > 1 file changed, 17 insertions(+), 16 deletions(-) > > diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c > index 04a4861..33b6318 100644 > --- a/drivers/pci/remove.c > +++ b/drivers/pci/remove.c > @@ -78,25 +78,14 @@ void pci_remove_bus(struct pci_bus *pci_bus) > } > EXPORT_SYMBOL(pci_remove_bus); > > -static void __pci_remove_behind_bridge(struct pci_dev *dev); > -/** > - * pci_stop_and_remove_bus_device - remove a PCI device and any children > - * @dev: the device to remove > - * > - * Remove a PCI device from the device lists, informing the drivers > - * that the device has been removed. We also remove any subordinate > - * buses and children in a depth-first manner. > - * > - * For each device we remove, delete the device structure from the > - * device lists, remove the /proc entry, and notify userspace > - * (/sbin/hotplug). > - */ > +static void pci_remove_behind_bridge(struct pci_dev *dev); > + > void __pci_remove_bus_device(struct pci_dev *dev) > { > if (dev->subordinate) { > struct pci_bus *b = dev->subordinate; > > - __pci_remove_behind_bridge(dev); > + pci_remove_behind_bridge(dev); > pci_remove_bus(b); > dev->subordinate = NULL; > } > @@ -105,13 +94,25 @@ void __pci_remove_bus_device(struct pci_dev *dev) > } > EXPORT_SYMBOL(__pci_remove_bus_device); > > +/** > + * pci_stop_and_remove_bus_device - remove a PCI device and any children > + * @dev: the device to remove > + * > + * Remove a PCI device from the device lists, informing the drivers > + * that the device has been removed. We also remove any subordinate > + * buses and children in a depth-first manner. > + * > + * For each device we remove, delete the device structure from the > + * device lists, remove the /proc entry, and notify userspace > + * (/sbin/hotplug). > + */ > void pci_stop_and_remove_bus_device(struct pci_dev *dev) > { > pci_stop_bus_device(dev); > __pci_remove_bus_device(dev); > } > > -static void __pci_remove_behind_bridge(struct pci_dev *dev) > +static void pci_remove_behind_bridge(struct pci_dev *dev) > { > struct list_head *l, *n; > > @@ -141,7 +142,7 @@ static void pci_stop_behind_bridge(struct pci_dev *dev) > void pci_stop_and_remove_behind_bridge(struct pci_dev *dev) > { > pci_stop_behind_bridge(dev); > - __pci_remove_behind_bridge(dev); > + pci_remove_behind_bridge(dev); > } > > static void pci_stop_bus_devices(struct pci_bus *bus) > -- > 1.7.9.5 > -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 2012-9-12 6:03, Bjorn Helgaas wrote: > On Tue, Aug 7, 2012 at 10:10 AM, Jiang Liu <liuj97@gmail.com> wrote: >> Trivial cleanups for drivers/pci/remove.c: >> 1) move the comment for pci_stop_and_remove_bus_device() to the right place >> 2) rename __pci_remove_behind_bridge() to pci_remove_behind_bridge() > > This seems fine, but I think my pci/bjorn-cleanup-remove branch subsumes it. Hi Bjorn, I have rebased my latest patchset to your pci-next branch, so this patch has been dropped. > >> Signed-off-by: Jiang Liu <liuj97@gmail.com> >> --- >> drivers/pci/remove.c | 33 +++++++++++++++++---------------- >> 1 file changed, 17 insertions(+), 16 deletions(-) >> >> diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c >> index 04a4861..33b6318 100644 >> --- a/drivers/pci/remove.c >> +++ b/drivers/pci/remove.c >> @@ -78,25 +78,14 @@ void pci_remove_bus(struct pci_bus *pci_bus) >> } >> EXPORT_SYMBOL(pci_remove_bus); >> >> -static void __pci_remove_behind_bridge(struct pci_dev *dev); >> -/** >> - * pci_stop_and_remove_bus_device - remove a PCI device and any children >> - * @dev: the device to remove >> - * >> - * Remove a PCI device from the device lists, informing the drivers >> - * that the device has been removed. We also remove any subordinate >> - * buses and children in a depth-first manner. >> - * >> - * For each device we remove, delete the device structure from the >> - * device lists, remove the /proc entry, and notify userspace >> - * (/sbin/hotplug). >> - */ >> +static void pci_remove_behind_bridge(struct pci_dev *dev); >> + >> void __pci_remove_bus_device(struct pci_dev *dev) >> { >> if (dev->subordinate) { >> struct pci_bus *b = dev->subordinate; >> >> - __pci_remove_behind_bridge(dev); >> + pci_remove_behind_bridge(dev); >> pci_remove_bus(b); >> dev->subordinate = NULL; >> } >> @@ -105,13 +94,25 @@ void __pci_remove_bus_device(struct pci_dev *dev) >> } >> EXPORT_SYMBOL(__pci_remove_bus_device); >> >> +/** >> + * pci_stop_and_remove_bus_device - remove a PCI device and any children >> + * @dev: the device to remove >> + * >> + * Remove a PCI device from the device lists, informing the drivers >> + * that the device has been removed. We also remove any subordinate >> + * buses and children in a depth-first manner. >> + * >> + * For each device we remove, delete the device structure from the >> + * device lists, remove the /proc entry, and notify userspace >> + * (/sbin/hotplug). >> + */ >> void pci_stop_and_remove_bus_device(struct pci_dev *dev) >> { >> pci_stop_bus_device(dev); >> __pci_remove_bus_device(dev); >> } >> >> -static void __pci_remove_behind_bridge(struct pci_dev *dev) >> +static void pci_remove_behind_bridge(struct pci_dev *dev) >> { >> struct list_head *l, *n; >> >> @@ -141,7 +142,7 @@ static void pci_stop_behind_bridge(struct pci_dev *dev) >> void pci_stop_and_remove_behind_bridge(struct pci_dev *dev) >> { >> pci_stop_behind_bridge(dev); >> - __pci_remove_behind_bridge(dev); >> + pci_remove_behind_bridge(dev); >> } >> >> static void pci_stop_bus_devices(struct pci_bus *bus) >> -- >> 1.7.9.5 >> > > . > -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index 04a4861..33b6318 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c @@ -78,25 +78,14 @@ void pci_remove_bus(struct pci_bus *pci_bus) } EXPORT_SYMBOL(pci_remove_bus); -static void __pci_remove_behind_bridge(struct pci_dev *dev); -/** - * pci_stop_and_remove_bus_device - remove a PCI device and any children - * @dev: the device to remove - * - * Remove a PCI device from the device lists, informing the drivers - * that the device has been removed. We also remove any subordinate - * buses and children in a depth-first manner. - * - * For each device we remove, delete the device structure from the - * device lists, remove the /proc entry, and notify userspace - * (/sbin/hotplug). - */ +static void pci_remove_behind_bridge(struct pci_dev *dev); + void __pci_remove_bus_device(struct pci_dev *dev) { if (dev->subordinate) { struct pci_bus *b = dev->subordinate; - __pci_remove_behind_bridge(dev); + pci_remove_behind_bridge(dev); pci_remove_bus(b); dev->subordinate = NULL; } @@ -105,13 +94,25 @@ void __pci_remove_bus_device(struct pci_dev *dev) } EXPORT_SYMBOL(__pci_remove_bus_device); +/** + * pci_stop_and_remove_bus_device - remove a PCI device and any children + * @dev: the device to remove + * + * Remove a PCI device from the device lists, informing the drivers + * that the device has been removed. We also remove any subordinate + * buses and children in a depth-first manner. + * + * For each device we remove, delete the device structure from the + * device lists, remove the /proc entry, and notify userspace + * (/sbin/hotplug). + */ void pci_stop_and_remove_bus_device(struct pci_dev *dev) { pci_stop_bus_device(dev); __pci_remove_bus_device(dev); } -static void __pci_remove_behind_bridge(struct pci_dev *dev) +static void pci_remove_behind_bridge(struct pci_dev *dev) { struct list_head *l, *n; @@ -141,7 +142,7 @@ static void pci_stop_behind_bridge(struct pci_dev *dev) void pci_stop_and_remove_behind_bridge(struct pci_dev *dev) { pci_stop_behind_bridge(dev); - __pci_remove_behind_bridge(dev); + pci_remove_behind_bridge(dev); } static void pci_stop_bus_devices(struct pci_bus *bus)
Trivial cleanups for drivers/pci/remove.c: 1) move the comment for pci_stop_and_remove_bus_device() to the right place 2) rename __pci_remove_behind_bridge() to pci_remove_behind_bridge() Signed-off-by: Jiang Liu <liuj97@gmail.com> --- drivers/pci/remove.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-)