]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
PCI: Use PCI_STD_NUM_BARS instead of 6
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 16 Apr 2025 10:02:39 +0000 (13:02 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 16 Apr 2025 18:21:28 +0000 (13:21 -0500)
pci_read_bases() is given literal 6 that means PCI_STD_NUM_BARS.  Replace
the literal with the define to annotate the code better.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Link: https://patch.msgid.link/20250416100239.6958-1-ilpo.jarvinen@linux.intel.com
drivers/pci/probe.c

index 364fa2a514f8a68fb18bded3259c6847d3932f8b..08971fca08193558648c52de5baf12e2b584e5fe 100644 (file)
@@ -2058,7 +2058,7 @@ int pci_setup_device(struct pci_dev *dev)
                if (class == PCI_CLASS_BRIDGE_PCI)
                        goto bad;
                pci_read_irq(dev);
-               pci_read_bases(dev, 6, PCI_ROM_ADDRESS);
+               pci_read_bases(dev, PCI_STD_NUM_BARS, PCI_ROM_ADDRESS);
 
                pci_subsystem_ids(dev, &dev->subsystem_vendor, &dev->subsystem_device);