Skip to content

Commit 36ca7f4

Browse files
ardbiesheuvelwilldeacon
authored andcommitted
arm64: mm: Remove bogus stop condition from map_mem() loop
The memblock API guarantees that start is not greater than or equal to end, so there is no need to test it. And if it were, it is doubtful that breaking out of the loop would be a reasonable course of action here (rather than attempting to map the remaining regions) So let's drop this check. Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
1 parent 13d0fdc commit 36ca7f4

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

arch/arm64/mm/mmu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,8 +1173,6 @@ static void __init map_mem(pgd_t *pgdp)
11731173

11741174
/* map all the memory banks */
11751175
for_each_mem_range(i, &start, &end) {
1176-
if (start >= end)
1177-
break;
11781176
/*
11791177
* The linear map must allow allocation tags reading/writing
11801178
* if MTE is present. Otherwise, it has the same attributes as

0 commit comments

Comments
 (0)