]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PCI: Simplify pcie_capability_clear_and_set_word() to ..._clear_word()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 26 Oct 2023 12:19:23 +0000 (15:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Apr 2024 15:07:11 +0000 (17:07 +0200)
[ Upstream commit 0fce6e5c87faec2c8bf28d2abc8cb595f4e244b6 ]

When using pcie_capability_clear_and_set_word() but not actually *setting*
anything, use pcie_capability_clear_word() instead.

Link: https://lore.kernel.org/r/20231026121924.2164-1-ilpo.jarvinen@linux.intel.com
Link: https://lore.kernel.org/r/20231026121924.2164-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
[bhelgaas: squash]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/pcie/aspm.c
drivers/pci/quirks.c

index 25736d408e88e54b3117115eb5d84539f8fea002..2a3d973658dac9fdb3c45913aa826fd19a9a4ffa 100644 (file)
@@ -743,10 +743,10 @@ static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state)
         * in pcie_config_aspm_link().
         */
        if (enable_req & (ASPM_STATE_L1_1 | ASPM_STATE_L1_2)) {
-               pcie_capability_clear_and_set_word(child, PCI_EXP_LNKCTL,
-                                                  PCI_EXP_LNKCTL_ASPM_L1, 0);
-               pcie_capability_clear_and_set_word(parent, PCI_EXP_LNKCTL,
-                                                  PCI_EXP_LNKCTL_ASPM_L1, 0);
+               pcie_capability_clear_word(child, PCI_EXP_LNKCTL,
+                                          PCI_EXP_LNKCTL_ASPM_L1);
+               pcie_capability_clear_word(parent, PCI_EXP_LNKCTL,
+                                          PCI_EXP_LNKCTL_ASPM_L1);
        }
 
        val = 0;
index 1131e353d8c9aad0a45782f4d1256431a28eb2f4..56dce858a69349bf7e8eadb6a944c2ba7143dbd2 100644 (file)
@@ -4476,9 +4476,9 @@ static void quirk_disable_root_port_attributes(struct pci_dev *pdev)
 
        pci_info(root_port, "Disabling No Snoop/Relaxed Ordering Attributes to avoid PCIe Completion erratum in %s\n",
                 dev_name(&pdev->dev));
-       pcie_capability_clear_and_set_word(root_port, PCI_EXP_DEVCTL,
-                                          PCI_EXP_DEVCTL_RELAX_EN |
-                                          PCI_EXP_DEVCTL_NOSNOOP_EN, 0);
+       pcie_capability_clear_word(root_port, PCI_EXP_DEVCTL,
+                                  PCI_EXP_DEVCTL_RELAX_EN |
+                                  PCI_EXP_DEVCTL_NOSNOOP_EN);
 }
 
 /*