public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] PCI: Use PCI_STD_NUM_BARS instead of 6
Date: Wed, 16 Apr 2025 12:11:55 +0200	[thread overview]
Message-ID: <Z_-Caya2spaSV8f4@ryzen> (raw)
In-Reply-To: <20250416100239.6958-1-ilpo.jarvinen@linux.intel.com>

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@linux.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@kernel.org>

  reply	other threads:[~2025-04-16 10:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 10:02 [PATCH 1/1] PCI: Use PCI_STD_NUM_BARS instead of 6 Ilpo Järvinen
2025-04-16 10:11 ` Niklas Cassel [this message]
2025-04-16 18:23 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_-Caya2spaSV8f4@ryzen \
    --to=cassel@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox