Commit 93d256cd authored by Bjorn Helgaas's avatar Bjorn Helgaas

x86/PCI: Eliminate remove_e820_regions() common subexpressions

Add local variables to reduce repetition later.  No functional change
intended.

Link: https://lore.kernel.org/r/20220304035110.988712-2-helgaas@kernel.orgSigned-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 31231092
......@@ -27,12 +27,14 @@ static void remove_e820_regions(struct resource *avail)
{
int i;
struct e820_entry *entry;
u64 e820_start, e820_end;
for (i = 0; i < e820_table->nr_entries; i++) {
entry = &e820_table->entries[i];
e820_start = entry->addr;
e820_end = entry->addr + entry->size - 1;
resource_clip(avail, entry->addr,
entry->addr + entry->size - 1);
resource_clip(avail, e820_start, e820_end);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment