linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Saheed O. Bolarinwa" <refactormyself@gmail.com>
To: helgaas@kernel.org
Cc: "Saheed O. Bolarinwa" <refactormyself@gmail.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH v3 0/5] Remove unncessary linked list from aspm.c
Date: Sat,  6 Nov 2021 18:54:58 +0100	[thread overview]
Message-ID: <20211106175503.27178-1-refactormyself@gmail.com> (raw)

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:
 -v3:
	- Remane 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

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

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

 drivers/pci/pcie/aspm.c | 152 ++++++++++++++++++++++++----------------
 include/linux/pci.h     |   3 +
 2 files changed, 94 insertions(+), 61 deletions(-)

-- 
2.20.1


             reply	other threads:[~2021-11-06 17:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-06 17:54 Saheed O. Bolarinwa [this message]
2021-11-06 17:54 ` [RFC PATCH v3 1/5] PCI: Handle NULL value inside pci_upstream_bridge() Saheed O. Bolarinwa
2021-11-06 17:55 ` [RFC PATCH v3 2/5] PCI/ASPM: Remove struct pcie_link_state.parent Saheed O. Bolarinwa
2021-11-06 17:55 ` [RFC PATCH v3 3/5] PCI/ASPM: Remove struct pcie_link_state.root Saheed O. Bolarinwa
2021-11-06 17:55 ` [RFC PATCH v3 4/5] PCI/ASPM: Remove struct pcie_link_state.downstream Saheed O. Bolarinwa
2021-11-06 17:55 ` [RFC PATCH v3 5/5] PCI/ASPM: Remove unncessary linked list from aspm.c Saheed O. Bolarinwa

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=20211106175503.27178-1-refactormyself@gmail.com \
    --to=refactormyself@gmail.com \
    --cc=helgaas@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;
as well as URLs for NNTP newsgroup(s).