Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp143969pxb; Tue, 28 Sep 2021 17:44:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2DtqC2wIiRf5rAESKA80gSfhr953VdAnkalxrW8ChEaJN9NWs5915vAsVY7ZqckRYPAAm X-Received: by 2002:a17:90a:1942:: with SMTP id 2mr3201226pjh.36.1632876267509; Tue, 28 Sep 2021 17:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632876267; cv=none; d=google.com; s=arc-20160816; b=Isee0vkTmUIno9evDiYEzvi64lNwTH9DVrRhSlPj8tpT+g41t2KKuttPGiOiuQBMic bEjXrYmK9HgleQ5Psbb3yLmPdbGCxbaphc6Z4PjoihK1KqMt2sqXugI14DsgtHOum9mc 7AmNGW1jY1clOKtQGfNSmhm6rp5V/WEPP/Qd6Yn4STIVxT8eHiPZnC4CBmtw8kNc3/Wz DK8on+fQ4DeNzx+ShJponuoDhqbU+xKYM6BjfzQodJFj9+D7xxXsxn5gsUsm+Vm/r2f2 QNtTJXuXSc9d72hrXzmIAqiVTbGXsB/kJXdYttq/E7BFKcDDUAFAWSKd9JZXNAY2jegC Rfmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZlIYojiY2l+5PvVT+yckjTN7OAGIe2SoywvUozflH+Q=; b=MdKPtrSRuFMurgo8G494uSPWUXAccrqk1eBXAxhfjpBTsgzW6NP5e5I0wrlRYHrsl3 vlpzawQVEdrDUZypOnTMAQHUKFp4zZy9qeLRs/jHraPEb+ym/zvOklxsRI6RHLasTdUb su8vTDKLpk9atw03zlEyc6oSzssGpI1nQaY76fS9U4dZ9RQ51ufElaf5SNqSf0QsaeoP ZUMH7uoY7/8G3j8UjV0C4c108CLuG/LEiCLcZLzb8wCVangEnqTfnzUgTsW1OV38rDFS K+TUg9dk0Sui5IGbqqynv0bRsaTtgi83lsZ7NbgikwzReoOTGMm33n4HjJtL+LpBiXjF IyEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Sf4mH3nW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s2si578675pje.179.2021.09.28.17.44.14; Tue, 28 Sep 2021 17:44:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Sf4mH3nW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243412AbhI2ApJ (ORCPT + 99 others); Tue, 28 Sep 2021 20:45:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243381AbhI2ApI (ORCPT ); Tue, 28 Sep 2021 20:45:08 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ECC5C06161C; Tue, 28 Sep 2021 17:43:28 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id r18so1825029edv.12; Tue, 28 Sep 2021 17:43:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZlIYojiY2l+5PvVT+yckjTN7OAGIe2SoywvUozflH+Q=; b=Sf4mH3nW8UlkBWeuAm4Q0ZWnoXKkSldDLmkUvD7JqUysBsxR7MC91I5/4CEQnm0fnM KX8rHR2MRRHPUhK7ccm9RoccNM2PvlT8P+8PQz+oNVQADqTAdH3WRDYpziOpIesJxhjm gUkOETZreH1E0LlyPkwtASdG24JnJckVSJjdKs6By6AvPCNYqC5mQctE+Ob/E0mui4FE 4RcVClN6WawPgIanxxwcr4UXV2RuycamQp/S8SUU7a/8ZuETsQTJgygxthlIFcDDUe6o bpU0x4QIGdIPA1fGUcUdQIU8lrHmrRtDN9NJjxMBTV9mCTGwSCk1poGEZDlKRIvE5vlG yaKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZlIYojiY2l+5PvVT+yckjTN7OAGIe2SoywvUozflH+Q=; b=zl+6i0vAJIIPu5/1idTIFT3SKFjGfy6ubu854EOHSVkKpN8aJdU5iaQvi5u76lwf4I 4+8UpVH9BVQ1n25JK5OBO18mZPWTy6ENT9hav+9Tyi0MhXiTDSWACoD08I5acQIgQqw4 5JY3/pVCv1aAxhlYpagDhO0DDQ/OnePVrIlddai4R7xPMGi2EqnvtO6oJirzEGy+I0EY gly+5cEB0Rzj+VIIsWzeS5ypMQtinCE+/3wPoL2kA4xRZI5LV9XTsQcBTGxVBXYUdLHf 8x+4JEm6dhzpp8jyGLiGWEItic9pyI6DGJmKL7Gh/uhieLXZOkozKrUbzGwh7q1YcU47 2asQ== X-Gm-Message-State: AOAM532MQYeYqbYsqk3lp72u2R16PvHrauNwLaFTTq7FlcUzDlEViKiX v8C83wOifXWv4mAM5ofaJwN7SrBDiTw= X-Received: by 2002:a17:906:1901:: with SMTP id a1mr10428425eje.129.1632876206941; Tue, 28 Sep 2021 17:43:26 -0700 (PDT) Received: from localhost.localdomain ([2a02:ab88:10f:c9f0:35c7:3af0:a197:61d0]) by smtp.googlemail.com with ESMTPSA id u16sm358489ejy.14.2021.09.28.17.43.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 17:43:26 -0700 (PDT) From: "Saheed O. Bolarinwa" To: helgaas@kernel.org Cc: "Bolarinwa O. Saheed" , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 0/4] Remove unncessary linked list from aspm.c Date: Wed, 29 Sep 2021 02:43:11 +0200 Message-Id: <20210929004315.22558-1-refactormyself@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Bolarinwa O. Saheed" 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(-) -- 2.20.1