PCI/ASPM: Clean up ASPM disable/enable mask calculation
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 22 Mar 2024 12:39:52 +0000 (14:39 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 2 May 2024 22:02:19 +0000 (17:02 -0500)
commitdc69062a1a73f0fe33a83401e8a3b1d5d54b43af
treee166c46a03ce8dcf704075ad4827fd147186d50b
parentb478e162f227d17d6a29f40ffd464af358334971
PCI/ASPM: Clean up ASPM disable/enable mask calculation

With only one set of defines remaining, state can be almost used as-is to
set ->aspm_disable/default. Only CLKPM and L1 PM substates need special
handling.

Remove unnecessary if conditions that can use the state variable bits
directly. Move ASPM mask calculation into pci_calc_aspm_enable_mask() and
pci_calc_aspm_disable_mask() helpers which makes it easier to alter state
variable directly.

Link: https://lore.kernel.org/r/20240322123952.6384-3-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/aspm.c