diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2023-10-18 13:32:51 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-10-24 17:54:04 +0200 |
commit | 9a9eec4765737b9b2a8d6ae03de6480a5f12dd5c (patch) | |
tree | 16be8c879c2301d02da4326852228ed8773797ce /drivers/pci/quirks.c | |
parent | PCI: hotplug: Use FIELD_GET/PREP() (diff) | |
download | linux-9a9eec4765737b9b2a8d6ae03de6480a5f12dd5c.tar.xz linux-9a9eec4765737b9b2a8d6ae03de6480a5f12dd5c.zip |
PCI/DPC: Use FIELD_GET()
Use FIELD_GET() to remove dependencies on the field position, i.e., the
shift value. No functional change intended.
Link: https://lore.kernel.org/r/20231018113254.17616-5-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r-- | drivers/pci/quirks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index eeec1d6f9023..a9fdc2e3f110 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -6154,7 +6154,7 @@ static void dpc_log_size(struct pci_dev *dev) if (!(val & PCI_EXP_DPC_CAP_RP_EXT)) return; - if (!((val & PCI_EXP_DPC_RP_PIO_LOG_SIZE) >> 8)) { + if (FIELD_GET(PCI_EXP_DPC_RP_PIO_LOG_SIZE, val) == 0) { pci_info(dev, "Overriding RP PIO Log Size to 4\n"); dev->dpc_rp_log_size = 4; } |