aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/mmconfig_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/pci/mmconfig_32.c')
-rw-r--r--arch/x86/pci/mmconfig_32.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index a3cee532c935..c04523e09649 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -28,15 +28,12 @@ static int mmcfg_last_accessed_cpu;
28static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) 28static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
29{ 29{
30 struct pci_mmcfg_region *cfg; 30 struct pci_mmcfg_region *cfg;
31 int cfg_num;
32 31
33 for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) { 32 list_for_each_entry(cfg, &pci_mmcfg_list, list)
34 cfg = &pci_mmcfg_config[cfg_num];
35 if (cfg->segment == seg && 33 if (cfg->segment == seg &&
36 (cfg->start_bus <= bus) && 34 (cfg->start_bus <= bus) &&
37 (cfg->end_bus >= bus)) 35 (cfg->end_bus >= bus))
38 return cfg->address; 36 return cfg->address;
39 }
40 37
41 /* Fall back to type 0 */ 38 /* Fall back to type 0 */
42 return 0; 39 return 0;