mtip32xx: use PCI #defines instead of numbers
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 26 Jan 2021 20:04:32 +0000 (14:04 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Jan 2021 20:09:37 +0000 (13:09 -0700)
Use PCI #defines for PCIe Device Control register values instead of
hard-coding bit positions.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/mtip32xx/mtip32xx.c

index 3fd99836bb1c427a70c57ab8838660b4e47f9ba8..b58f3a59b5bbb57a96599fcd182457d920751213 100644 (file)
@@ -3932,8 +3932,8 @@ static void mtip_disable_link_opts(struct driver_data *dd, struct pci_dev *pdev)
                pci_read_config_word(pdev,
                        pos + PCI_EXP_DEVCTL,
                        &pcie_dev_ctrl);
-               if (pcie_dev_ctrl & (1 << 11) ||
-                   pcie_dev_ctrl & (1 << 4)) {
+               if (pcie_dev_ctrl & PCI_EXP_DEVCTL_NOSNOOP_EN ||
+                   pcie_dev_ctrl & PCI_EXP_DEVCTL_RELAX_EN) {
                        dev_info(&dd->pdev->dev,
                                "Disabling ERO/No-Snoop on bridge device %04x:%04x\n",
                                        pdev->vendor, pdev->device);