Skip to content

PCI Hotplug: cpqphp cleanups

Alex Chiang lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15PCI Hotplug: cpqphp: stray whitespace cleanupsdrivers/pci/hotplug/cpqphp.h drivers/pci/hotplug/cpqphp_core.c drivers/pci/hotplug/cpqphp_ctrl.c +2 more+110 -1220 replies
2/15PCI Hotplug: cpqphp: fix comment styledrivers/pci/hotplug/cpqphp.h drivers/pci/hotplug/cpqphp_core.c drivers/pci/hotplug/cpqphp_ctrl.c +2 more+387 -3150 replies
3/15PCI Hotplug: cpqphp: obey 80 column convention in cpqphp.hdrivers/pci/hotplug/cpqphp.h+45 -310 replies
4/15PCI Hotplug: cpqphp: remove useless prototypes in cpqphp_core.cdrivers/pci/hotplug/cpqphp_core.c+224 -2370 replies
5/15PCI Hotplug: cpqphp: eliminate stray bracesdrivers/pci/hotplug/cpqphp_core.c+22 -330 replies
6/15PCI Hotplug: cpqphp: refactor cpqhp_probedrivers/pci/hotplug/cpqphp_core.c+185 -1970 replies
7/15PCI Hotplug: cpqphp: clean up cpqphp_ctrl.cdrivers/pci/hotplug/cpqphp_ctrl.c+79 -910 replies
8/15PCI Hotplug: cpqphp: refactor cpqphp_save_slot_configdrivers/pci/hotplug/cpqphp_pci.c+39 -460 replies
9/15PCI Hotplug: cpqphp: style cleanupsdrivers/pci/hotplug/cpqphp_pci.c+6 -110 replies
10/15PCI Hotplug: cpqphp: refactor cpqhp_save_configdrivers/pci/hotplug/cpqphp_pci.c+91 -910 replies
11/15PCI Hotplug: cpqphp: clean up accesses to pcibios_get_irq_routing_table()drivers/pci/hotplug/cpqphp.h drivers/pci/hotplug/cpqphp_core.c drivers/pci/hotplug/cpqphp_pci.c+47 -700 replies
12/15PCI Hotplug: cpqphp: eliminate dead code - PCI_ScanBusNonBridgedrivers/pci/hotplug/cpqphp_pci.c+2 -120 replies
13/15PCI Hotplug: cpqphp: constify slot_name()drivers/pci/hotplug/cpqphp.h+1 -10 replies
14/15PCI Hotplug: cpqphp: don't use pci_find_slot()drivers/pci/hotplug/Kconfig drivers/pci/hotplug/cpqphp_pci.c+12 -60 replies
15/15PCI: remove deprecated pci_find_slot() interfacedrivers/pci/search.c include/linux/pci.h+0 -381 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/15] PCI Hotplug: cpqphp cleanups

Hi Jesse,

This is my first pass at cleaning up cpqphp. Why? I dunno, I found some old hardware and thought it might be fun to clean up a crufty old driver.

This series is mostly whitespace and style fixes. A few functions have been reworked so they aren't indented quite so much. I expect that the first few patches will be very hard to read because there's so much code movement, but it does help with readability towards the end of the series.

At the end of the series, we start to see some more interesting changes. For one, we no longer call pcibios_get_irq_routing_table nearly as often.

The other is removing the pci_find_slot() interface. I'm still in the process of untangling exactly what the lifetime rules are for a pci_dev in cpqphp, but this is a good step forward, and also finally gets rid of the last in-tree caller of pci_find_slot(), which would be nice for 2.6.30. Also, this means that cpqphp no longer depends on PCI_LEGACY.

The current functional state of cpqphp is broken. We are able to load the module and successfully power off cards. We have some issues when we try to power them back on though, because commit b81d988c "broke" cpqphp and we get BAR collisions when we try to hot-add. However, I use "broke" very loosely, as I agree with Bjorn's commit, and cpqphp is doing horrible things like essentially duplicating a lot of the PCI core, incorrectly, I might add. Once I rip out some more of the PCI code in cpqphp, I expect hot-add to work again.

I plan on untangling that in the next phase of cleanups.

I've successfully tested my changes on my DL580g2. No functional regressions (compared to behavior since b81d988c).

Anyhow, please consider applying this series for the current merge window. I'd like to be able to turn off PCI_LEGACY. :)

Thanks!

/ac

---

Alex Chiang (15):
PCI: remove deprecated pci_find_slot() interface
PCI Hotplug: cpqphp: don't use pci_find_slot()
PCI Hotplug: cpqphp: constify slot_name()
PCI Hotplug: cpqphp: eliminate dead code - PCI_ScanBusNonBridge PCI Hotplug: cpqphp: clean up accesses to pcibios_get_irq_routing_table() PCI Hotplug: cpqphp: refactor cpqhp_save_config
PCI Hotplug: cpqphp: style cleanups
PCI Hotplug: cpqphp: refactor cpqphp_save_slot_config
PCI Hotplug: cpqphp: clean up cpqphp_ctrl.c
PCI Hotplug: cpqphp: refactor cpqhp_probe
PCI Hotplug: cpqphp: eliminate stray braces
PCI Hotplug: cpqphp: remove useless prototypes in cpqphp_core.c PCI Hotplug: cpqphp: obey 80 column convention in cpqphp.h PCI Hotplug: cpqphp: fix comment style
PCI Hotplug: cpqphp: stray whitespace cleanups

 drivers/pci/hotplug/Kconfig        |    2 
 drivers/pci/hotplug/cpqphp.h       |  167 +++--
 drivers/pci/hotplug/cpqphp_core.c  | 1101 +++++++++++++++++-------------------
 drivers/pci/hotplug/cpqphp_ctrl.c  |  371 ++++++------
 drivers/pci/hotplug/cpqphp_nvram.c |   97 ++-
 drivers/pci/hotplug/cpqphp_pci.c   |  599 ++++++++++----------
 drivers/pci/search.c               |   30 -
 include/linux/pci.h                |    8 
 8 files changed, 1162 insertions(+), 1213 deletions(-)