diff options
Diffstat (limited to 'arch/x86/pci/mmconfig-shared.c')
| -rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 4 | 
1 files changed, 1 insertions, 3 deletions
| diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index a918553ebc75..e282886616a0 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
| @@ -65,7 +65,6 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start, | |||
| 65 | int end, u64 addr) | 65 | int end, u64 addr) | 
| 66 | { | 66 | { | 
| 67 | struct pci_mmcfg_region *new; | 67 | struct pci_mmcfg_region *new; | 
| 68 | int num_buses; | ||
| 69 | struct resource *res; | 68 | struct resource *res; | 
| 70 | 69 | ||
| 71 | if (addr == 0) | 70 | if (addr == 0) | 
| @@ -82,10 +81,9 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start, | |||
| 82 | 81 | ||
| 83 | list_add_sorted(new); | 82 | list_add_sorted(new); | 
| 84 | 83 | ||
| 85 | num_buses = end - start + 1; | ||
| 86 | res = &new->res; | 84 | res = &new->res; | 
| 87 | res->start = addr + PCI_MMCFG_BUS_OFFSET(start); | 85 | res->start = addr + PCI_MMCFG_BUS_OFFSET(start); | 
| 88 | res->end = addr + PCI_MMCFG_BUS_OFFSET(num_buses) - 1; | 86 | res->end = addr + PCI_MMCFG_BUS_OFFSET(end + 1) - 1; | 
| 89 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 87 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 
| 90 | snprintf(new->name, PCI_MMCFG_RESOURCE_NAME_LEN, | 88 | snprintf(new->name, PCI_MMCFG_RESOURCE_NAME_LEN, | 
| 91 | "PCI MMCONFIG %04x [bus %02x-%02x]", segment, start, end); | 89 | "PCI MMCONFIG %04x [bus %02x-%02x]", segment, start, end); | 
