[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_-Caya2spaSV8f4@ryzen>
Date: Wed, 16 Apr 2025 12:11:55 +0200
From: Niklas Cassel <cassel@...nel.org>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] PCI: Use PCI_STD_NUM_BARS instead of 6
On Wed, Apr 16, 2025 at 01:02:39PM +0300, Ilpo Järvinen wrote:
> 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@...ux.intel.com>
> ---
> drivers/pci/probe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 364fa2a514f8..08971fca0819 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -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);
>
>
> base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
> --
> 2.39.5
>
Reviewed-by: Niklas Cassel <cassel@...nel.org>
Powered by blists - more mailing lists