diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2022-03-03 18:04:43 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2022-04-04 09:31:44 -0500 |
commit | 93d256cd3c1e93c4093e8015b371e832de4c4146 (patch) | |
tree | 57a16760e70da7cdb60ed365b675f68b9562cbc8 /arch/x86/kernel/resource.c | |
parent | 3123109284176b1532874591f7c81f3837bbdc17 (diff) | |
download | lwn-93d256cd3c1e93c4093e8015b371e832de4c4146.tar.gz lwn-93d256cd3c1e93c4093e8015b371e832de4c4146.zip |
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.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/x86/kernel/resource.c')
-rw-r--r-- | arch/x86/kernel/resource.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c index 9b9fb7882c20..8ffe68437744 100644 --- a/arch/x86/kernel/resource.c +++ b/arch/x86/kernel/resource.c @@ -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); } } |