Skip to content

Commit 76850b5

Browse files
rwk-gitbjorn-helgaas
authored andcommitted
PCI: endpoint: Replace magic number '6' by PCI_STD_NUM_BARS
Replace the constant "6" by PCI_STD_NUM_BARS, as defined in include/uapi/linux/pci_regs.h: #define PCI_STD_NUM_BARS 6 /* Number of standard BARs */ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rick Wertenbroek <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 40384c8 commit 76850b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/pci-epf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ struct pci_epf {
157157
struct device dev;
158158
const char *name;
159159
struct pci_epf_header *header;
160-
struct pci_epf_bar bar[6];
160+
struct pci_epf_bar bar[PCI_STD_NUM_BARS];
161161
u8 msi_interrupts;
162162
u16 msix_interrupts;
163163
u8 func_no;
@@ -174,7 +174,7 @@ struct pci_epf {
174174
/* Below members are to attach secondary EPC to an endpoint function */
175175
struct pci_epc *sec_epc;
176176
struct list_head sec_epc_list;
177-
struct pci_epf_bar sec_epc_bar[6];
177+
struct pci_epf_bar sec_epc_bar[PCI_STD_NUM_BARS];
178178
u8 sec_epc_func_no;
179179
struct config_group *group;
180180
unsigned int is_bound;

0 commit comments

Comments
 (0)