Commit 5e074725 authored by Liam Ni's avatar Liam Ni Committed by Andrew Morton
Browse files

mm/early_ioremap.c: improve the execution efficiency of early_ioremap_setup()

Reduce the number of invalid loops of the function early_ioremap_setup()
to improve the efficiency of function execution

Link: https://lkml.kernel.org/r/CACZJ9cU6t5sLoDwE6_XOg+UJLpZt4+qHfjYN2bA0s+3y9y6pQQ@mail.gmail.com


Signed-off-by: default avatarLiamNi <zhiguangni01@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 396faf88
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -72,13 +72,11 @@ void __init early_ioremap_setup(void)
{
	int i;

	for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
		if (WARN_ON(prev_map[i]))
			break;

	for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
	for (i = 0; i < FIX_BTMAPS_SLOTS; i++) {
		WARN_ON_ONCE(prev_map[i]);
		slot_virt[i] = __fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
	}
}

static int __init check_early_ioremap_leak(void)
{