From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F1D3C433DF for ; Sat, 22 Aug 2020 21:04:09 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E18082078A for ; Sat, 22 Aug 2020 21:04:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="feRvv+l+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E18082078A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C83DD204AE; Sat, 22 Aug 2020 21:04:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nu1IFa6ttDap; Sat, 22 Aug 2020 21:04:05 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 71CC920513; Sat, 22 Aug 2020 21:04:05 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6A037C089F; Sat, 22 Aug 2020 21:04:05 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 46335C0051 for ; Sat, 22 Aug 2020 21:04:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 070FC883C1 for ; Sat, 22 Aug 2020 21:04:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y+EyqGUyU6mw for ; Sat, 22 Aug 2020 21:04:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id 40CF7883B8 for ; Sat, 22 Aug 2020 21:04:01 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id a65so1347141wme.5 for ; Sat, 22 Aug 2020 14:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a+UXevqq6LALix6G+ml0WiFe3Rh1h9bnZgIuRDvj0Lw=; b=feRvv+l+CjK2qy9zt++PvB1cr0uQ3L6bmlXWxbH5bl5oV9cm7E2GDTTZnbT4JhEvsw j2gvmpeqRNs/N+94Hi8eysDf7IipTNkTDla3ltEV7yiHXJUajLeB1pkeetiaMLqYM5tN MqJD9uvh4AS5QnHhm4Chy0r+fY82jka5yPhuAMqjnJoWQNH0ZL7WuE4uF08DMmonx5L4 aZHUQbxAXaFnRcYKDaLhqS9M6J07V82PYJS3Qkrw4Z7trMtPM/mXIBO+gaD3Lnwmukmd zpMolHEG3uM/FfCVaIs1u1phfR/SXuGJgAyNxF6hf84nJjSpcinVZGV6SZ6cySxVsHwj Dm0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=a+UXevqq6LALix6G+ml0WiFe3Rh1h9bnZgIuRDvj0Lw=; b=Qctd5GfBuIdFG5L9vOltlDQWjJysPlj974d7JtuzrSr429XDRYCF89HC12Py013Be9 jCAAafFS6erWziV4MQ4y+GcIZvFTubXseO5Vp7djFnX7+TKhMW4J0G2WlQrhnBVMGZHX XwqLmb3asp0QFDeTCH7m/rhzdd2guyM4r/AN7sQBlsB7d8jxN/aAHQuwibfeD4tt2aF7 apcQJETjI7aynqqrCepUQ6mEIWUoyHCzqssXtrF+t3JxxKcS2TbWyIAv3AzfwZ5epoVf tNu2MwQ2En/3gXOKXd4UveC7Y4F+M9d9oPe2mpXQgQJjLnCvhdy6x2oIpIouemmhrXL4 vCug== X-Gm-Message-State: AOAM530CPwhgIX37M229JDet/Np7RhYkP0typtzxkhww4Bw9eoPOnU4L eC0d7KYXbvSF5v/jSgzVcu4= X-Google-Smtp-Source: ABdhPJyJnqKm2CyIpfOWI5FQtB7sHrW17+IC/8umUb3Fi5knONjyqUlRGd5MslPwd6E76LnLDaMv8A== X-Received: by 2002:a7b:cf2f:: with SMTP id m15mr9372093wmg.69.1598130239710; Sat, 22 Aug 2020 14:03:59 -0700 (PDT) Received: from net.saheed (563BDA2C.dsl.pool.telekom.hu. [86.59.218.44]) by smtp.gmail.com with ESMTPSA id y2sm14868321wmg.25.2020.08.22.14.03.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Aug 2020 14:03:59 -0700 (PDT) From: "Saheed O. Bolarinwa" To: helgaas@kernel.org Date: Sat, 22 Aug 2020 22:03:54 +0200 Message-Id: <20200822200358.252967-20-refactormyself@gmail.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: <20200822200358.252967-1-refactormyself@gmail.com> References: <20200822200358.252967-1-refactormyself@gmail.com> Cc: "Saheed O. Bolarinwa" , linux-kernel-mentees@lists.linuxfoundation.org Subject: [Linux-kernel-mentees] [RFC PATCH v5 19/23] PCI: Remove .parent from struct pcie_link_state X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" - Remove initiations of pcie_link_state.parent - Replace all access to pcie_link_state.parent with pci_pdev.parent - Remove pcie_link_state.parent Signed-off-by: Saheed O. Bolarinwa --- drivers/pci/pcie/aspm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 8d5a38081753..14b9da0a4efd 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -45,7 +45,6 @@ struct pcie_link_state { struct pci_dev *pdev; /* Upstream component of the Link */ struct pci_dev *downstream; /* Downstream component, function 0 */ struct pcie_link_state *root; /* pointer to the root port link */ - struct pcie_link_state *parent; /* pointer to the parent Link state */ }; static int aspm_disabled, aspm_force; @@ -396,7 +395,6 @@ static void pcie_aspm_check_latency(struct pci_dev *endpoint) l1_switch_latency += 1000; - link = link->parent; pdev = pdev->parent; } } @@ -813,8 +811,7 @@ static int alloc_pcie_link_state(struct pci_dev *pdev) return -1; } - link->parent = parent; - link->root = link->parent->root; + link->root = link->pdev->parent->link_state->root; pdev->parent = pdev->bus->parent->self; pdev->root = pdev->parent->root; } @@ -948,7 +945,7 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev) link = parent->link_state; root = link->root; - parent_link = link->parent; + parent_link = link->pdev->parent->link_state; /* All functions are removed, so just disable ASPM for the link */ pcie_config_aspm_link(parent, 0); -- 2.18.4 _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees