From: Bjorn Helgaas <helgaas@kernel.org>
To: Frederick Lawler <fred@fredlawl.com>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
ptalbert@redhat.com
Subject: Re: [PATCH] PCI/ASPM: Remove unused lists from struct pcie_link_state
Date: Mon, 17 Dec 2018 14:32:44 -0600 [thread overview]
Message-ID: <20181217203244.GD28981@google.com> (raw)
In-Reply-To: <20181209224550.18931-1-fred@fredlawl.com>
On Sun, Dec 09, 2018 at 04:45:50PM -0600, Frederick Lawler wrote:
> ASPM does not make use of the children or link LIST_HEADs declared in
> struct pcie_link_state and defined in alloc_pcie_link_state(). Therefore,
> remove these lists.
>
> No functional change intended.
>
> Signed-off-by: Frederick Lawler <fred@fredlawl.com>
Applied to pci/aspm for v4.21, thanks, Fred!
> ---
> drivers/pci/pcie/aspm.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
> index dcb29cb76dc6..2330ebf6df72 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -53,8 +53,6 @@ struct pcie_link_state {
> struct pcie_link_state *root; /* pointer to the root port link */
> struct pcie_link_state *parent; /* pointer to the parent Link state */
> struct list_head sibling; /* node in link_list */
> - struct list_head children; /* list of child link states */
> - struct list_head link; /* node in parent's children list */
>
> /* ASPM state */
> u32 aspm_support:7; /* Supported ASPM state */
> @@ -850,8 +848,6 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev)
> return NULL;
>
> INIT_LIST_HEAD(&link->sibling);
> - INIT_LIST_HEAD(&link->children);
> - INIT_LIST_HEAD(&link->link);
> link->pdev = pdev;
> link->downstream = pci_function_0(pdev->subordinate);
>
> @@ -877,7 +873,6 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev)
>
> link->parent = parent;
> link->root = link->parent->root;
> - list_add(&link->link, &parent->children);
> }
>
> list_add(&link->sibling, &link_list);
> @@ -1001,7 +996,6 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev)
> /* All functions are removed, so just disable ASPM for the link */
> pcie_config_aspm_link(link, 0);
> list_del(&link->sibling);
> - list_del(&link->link);
> /* Clock PM is for endpoint device */
> free_link_state(link);
>
> --
> 2.17.1
>
prev parent reply other threads:[~2018-12-17 20:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-09 22:45 [PATCH] PCI/ASPM: Remove unused lists from struct pcie_link_state Frederick Lawler
2018-12-17 20:32 ` Bjorn Helgaas [this message]
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=20181217203244.GD28981@google.com \
--to=helgaas@kernel.org \
--cc=fred@fredlawl.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=ptalbert@redhat.com \
/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