提交 d3578ef7 编写于 作者: B Bjorn Helgaas 提交者: Jesse Barnes

x86/PCI: MMCONFIG: step through MCFG table, not pci_mmcfg_config[]

Step through the ACPI MCFG table, not pci_mmcfg_config[].  No functional
change, but simplifies future patches that encapsulate pci_mmcfg_config[].
Reviewed-by: NYinghai Lu <yinghai@kernel.org>
Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 e823d6ff
......@@ -554,6 +554,7 @@ static int __init acpi_mcfg_check_entry(struct acpi_table_mcfg *mcfg,
static int __init pci_parse_mcfg(struct acpi_table_header *header)
{
struct acpi_table_mcfg *mcfg;
struct acpi_mcfg_allocation *cfg_table, *cfg;
unsigned long i;
int entries, config_size;
......@@ -586,8 +587,10 @@ static int __init pci_parse_mcfg(struct acpi_table_header *header)
memcpy(pci_mmcfg_config, &mcfg[1], config_size);
pci_mmcfg_config_num = entries;
cfg_table = (struct acpi_mcfg_allocation *) &mcfg[1];
for (i = 0; i < entries; i++) {
if (acpi_mcfg_check_entry(mcfg, &pci_mmcfg_config[i])) {
cfg = &cfg_table[i];
if (acpi_mcfg_check_entry(mcfg, cfg)) {
kfree(pci_mmcfg_config);
pci_mmcfg_config_num = 0;
return -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册