Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] PCI: endpoint: Replace magic number "6" by PCI_STD_NUM_BARS
@ 2024-12-12 16:25 Rick Wertenbroek
  2024-12-12 16:29 ` Rick Wertenbroek
  2024-12-12 19:00 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Rick Wertenbroek @ 2024-12-12 16:25 UTC (permalink / raw)
  Cc: rick.wertenbroek, Rick Wertenbroek, Bjorn Helgaas, linux-pci,
	linux-kernel

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>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-12 19:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox