* [PATCH 1/2] PCI/ASPM: Simplify pcie_capability_clear_and_set_word() to ..._clear_word()
@ 2023-10-26 12:19 Ilpo Järvinen
2023-10-26 12:19 ` [PATCH 2/2] PCI: " Ilpo Järvinen
2023-10-26 16:29 ` [PATCH 1/2] PCI/ASPM: " Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2023-10-26 12:19 UTC (permalink / raw)
To: linux-pci, Bjorn Helgaas, linux-kernel; +Cc: Ilpo Järvinen
When set parameter is 0, pcie_capability_clear_and_set_word() can be
turned into pcie_capability_clear_word() which makes the intent of the
code slightly more obvious.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/pci/pcie/aspm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 1bf630059264..3b0508b47472 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -689,10 +689,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;
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] PCI: Simplify pcie_capability_clear_and_set_word() to ..._clear_word()
2023-10-26 12:19 [PATCH 1/2] PCI/ASPM: Simplify pcie_capability_clear_and_set_word() to ..._clear_word() Ilpo Järvinen
@ 2023-10-26 12:19 ` Ilpo Järvinen
2023-10-26 16:29 ` [PATCH 1/2] PCI/ASPM: " Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2023-10-26 12:19 UTC (permalink / raw)
To: linux-pci, Bjorn Helgaas, linux-kernel; +Cc: Ilpo Järvinen
When set parameter is 0, pcie_capability_clear_and_set_word() can be
turned into pcie_capability_clear_word() which makes the intent of the
code slightly more obvious.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/pci/quirks.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index eeec1d6f9023..180d01141e50 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4553,9 +4553,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);
}
/*
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] PCI/ASPM: Simplify pcie_capability_clear_and_set_word() to ..._clear_word()
2023-10-26 12:19 [PATCH 1/2] PCI/ASPM: Simplify pcie_capability_clear_and_set_word() to ..._clear_word() Ilpo Järvinen
2023-10-26 12:19 ` [PATCH 2/2] PCI: " Ilpo Järvinen
@ 2023-10-26 16:29 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2023-10-26 16:29 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: linux-pci, Bjorn Helgaas, linux-kernel
On Thu, Oct 26, 2023 at 03:19:23PM +0300, Ilpo Järvinen wrote:
> When set parameter is 0, pcie_capability_clear_and_set_word() can be
> turned into pcie_capability_clear_word() which makes the intent of the
> code slightly more obvious.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Squashed and applied to pci/misc for v6.7, thanks!
> ---
> drivers/pci/pcie/aspm.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
> index 1bf630059264..3b0508b47472 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -689,10 +689,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;
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-26 16:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-26 12:19 [PATCH 1/2] PCI/ASPM: Simplify pcie_capability_clear_and_set_word() to ..._clear_word() Ilpo Järvinen
2023-10-26 12:19 ` [PATCH 2/2] PCI: " Ilpo Järvinen
2023-10-26 16:29 ` [PATCH 1/2] PCI/ASPM: " Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox