mbox series

[RFC,v2,0/4] Remove unncessary linked list from aspm.c

Message ID 20210929004315.22558-1-refactormyself@gmail.com
Headers show
Series Remove unncessary linked list from aspm.c | expand

Message

Saheed O. Bolarinwa Sept. 29, 2021, 12:43 a.m. UTC
From: "Bolarinwa O. Saheed" <refactormyself@gmail.com>

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:
 - v2:
»       - Avoid using BUG_ON()
»       - Create helper function pci_get_parent()
»       - Fix a bug from the previous version

MERGE NOTICE:
These series are based on
»       'commit e4e737bb5c17 ("Linux 5.15-rc2")'

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

 drivers/pci/pcie/aspm.c | 134 +++++++++++++++++++++++-----------------
 1 file changed, 78 insertions(+), 56 deletions(-)