Skip to content

Commit 0fce6e5

Browse files
ij-intelbjorn-helgaas
authored andcommitted
PCI: Simplify pcie_capability_clear_and_set_word() to ..._clear_word()
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/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]> [bhelgaas: squash] Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent c9501d2 commit 0fce6e5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

drivers/pci/pcie/aspm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,10 +689,10 @@ static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state)
689689
* in pcie_config_aspm_link().
690690
*/
691691
if (enable_req & (ASPM_STATE_L1_1 | ASPM_STATE_L1_2)) {
692-
pcie_capability_clear_and_set_word(child, PCI_EXP_LNKCTL,
693-
PCI_EXP_LNKCTL_ASPM_L1, 0);
694-
pcie_capability_clear_and_set_word(parent, PCI_EXP_LNKCTL,
695-
PCI_EXP_LNKCTL_ASPM_L1, 0);
692+
pcie_capability_clear_word(child, PCI_EXP_LNKCTL,
693+
PCI_EXP_LNKCTL_ASPM_L1);
694+
pcie_capability_clear_word(parent, PCI_EXP_LNKCTL,
695+
PCI_EXP_LNKCTL_ASPM_L1);
696696
}
697697

698698
val = 0;

drivers/pci/quirks.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4555,9 +4555,9 @@ static void quirk_disable_root_port_attributes(struct pci_dev *pdev)
45554555

45564556
pci_info(root_port, "Disabling No Snoop/Relaxed Ordering Attributes to avoid PCIe Completion erratum in %s\n",
45574557
dev_name(&pdev->dev));
4558-
pcie_capability_clear_and_set_word(root_port, PCI_EXP_DEVCTL,
4559-
PCI_EXP_DEVCTL_RELAX_EN |
4560-
PCI_EXP_DEVCTL_NOSNOOP_EN, 0);
4558+
pcie_capability_clear_word(root_port, PCI_EXP_DEVCTL,
4559+
PCI_EXP_DEVCTL_RELAX_EN |
4560+
PCI_EXP_DEVCTL_NOSNOOP_EN);
45614561
}
45624562

45634563
/*

0 commit comments

Comments
 (0)