Skip to content

RFC Remove unncessary linked list from aspm.c

Saheed O. Bolarinwa linux-pci lkml 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 RFC Latest5 patches 0 repliesNew
  2. v3 RFC5 patches 0 repliesSuperseded
  3. v2 RFC4 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC4 patches1 replySuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5PCI: Handle NULL value inside pci_upstream_bridge()include/linux/pci.h+3 -00 replies
2/5PCI/ASPM: Remove struct pcie_link_state.parentdrivers/pci/pcie/aspm.c+26 -130 replies
3/5PCI/ASPM: Remove struct pcie_link_state.rootdrivers/pci/pcie/aspm.c+35 -330 replies
4/5PCI/ASPM: Remove struct pcie_link_state.downstreamdrivers/pci/pcie/aspm.c+8 -60 replies
5/5PCI/ASPM: Remove unncessary linked list from aspm.cdrivers/pci/pcie/aspm.c+34 -200 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [RFC PATCH v4 0/5] Remove unncessary linked list from aspm.c

An extra linked list is created inside aspm.c to keep track of devices on which the link state was enabled. However, it is possible to access them via existing device lists.

This series remove the extra linked list and other related members of the struct pcie_link_state: root, parent and downstream. All these are now either calculated or obtained directly when needed.

VERSION CHANGES:
-v4:
- Fix uninitialised variable.

-v3:
» - Rename pci_get_parent() to pcie_upstream_link() and improve
» the logic based previous review.
» - Improve the algorithm to iterate through the devices

- v2:

»       - Avoid using BUG_ON()
»       - Create helper function pci_get_parent()
»       - Fix a bug from the previous version

Bolarinwa O. Saheed (4):
PCI/ASPM: Remove struct pcie_link_state.parent PCI/ASPM: Remove struct pcie_link_state.root PCI/ASPM: Remove struct pcie_link_state.downstream PCI/ASPM: Remove unncessary linked list from aspm.c

Saheed O. Bolarinwa (1):
PCI: Handle NULL value inside pci_upstream_bridge()

 drivers/pci/pcie/aspm.c | 153 ++++++++++++++++++++++++----------------
 include/linux/pci.h     |   3 +
 2 files changed, 95 insertions(+), 61 deletions(-)
Signature · 1 line
2.20.1