Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Rick Wertenbroek <rick.wertenbroek@gmail.com>
Cc: rick.wertenbroek@heig-vd.ch, Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: endpoint: Replace magic number "6" by PCI_STD_NUM_BARS
Date: Thu, 12 Dec 2024 13:00:32 -0600	[thread overview]
Message-ID: <20241212190032.GA3356901@bhelgaas> (raw)
In-Reply-To: <20241212162547.225880-1-rick.wertenbroek@gmail.com>

On Thu, Dec 12, 2024 at 05:25:47PM +0100, Rick Wertenbroek wrote:
> Replace the constant "6" by PCI_STD_NUM_BARS, as defined in
> include/uapi/linux/pci_regs.h:
> 
> Signed-off-by: Rick Wertenbroek <rick.wertenbroek@gmail.com>

Applied to pci/endpoint for v6.14, thanks!

> ---
>  include/linux/pci-epf.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/pci-epf.h b/include/linux/pci-epf.h
> index 18a3aeb62ae4..ee6156bcbbd0 100644
> --- a/include/linux/pci-epf.h
> +++ b/include/linux/pci-epf.h
> @@ -157,7 +157,7 @@ struct pci_epf {
>  	struct device		dev;
>  	const char		*name;
>  	struct pci_epf_header	*header;
> -	struct pci_epf_bar	bar[6];
> +	struct pci_epf_bar	bar[PCI_STD_NUM_BARS];
>  	u8			msi_interrupts;
>  	u16			msix_interrupts;
>  	u8			func_no;
> @@ -174,7 +174,7 @@ struct pci_epf {
>  	/* Below members are to attach secondary EPC to an endpoint function */
>  	struct pci_epc		*sec_epc;
>  	struct list_head	sec_epc_list;
> -	struct pci_epf_bar	sec_epc_bar[6];
> +	struct pci_epf_bar	sec_epc_bar[PCI_STD_NUM_BARS];
>  	u8			sec_epc_func_no;
>  	struct config_group	*group;
>  	unsigned int		is_bound;
> -- 
> 2.25.1
> 

      parent reply	other threads:[~2024-12-12 19:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 16:25 [PATCH] PCI: endpoint: Replace magic number "6" by PCI_STD_NUM_BARS Rick Wertenbroek
2024-12-12 16:29 ` Rick Wertenbroek
2024-12-12 19:00 ` Bjorn Helgaas [this message]

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=20241212190032.GA3356901@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rick.wertenbroek@gmail.com \
    --cc=rick.wertenbroek@heig-vd.ch \
    /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