mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
riscv: remove unreachable invalid range check in kasan_init()
kasan_init() populates the linear mapping shadow with for_each_mem_range() and breaks the loop when start >= end. for_each_mem_range() never returns an invalid range, so start < end always. Therefore the start >= end check is unreachable, so remove it. No functional change. Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Reviewed-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Tested-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Reviewed-by: Andrey Ryabinin <ryabinin.a.a@gmail.com> Link: https://patch.msgid.link/20260630150413.1718632-5-ekffu200098@gmail.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
This commit is contained in:
parent
99e60ebe10
commit
8008f6995d
|
|
@ -512,9 +512,6 @@ void __init kasan_init(void)
|
|||
void *start = (void *)__va(p_start);
|
||||
void *end = (void *)__va(p_end);
|
||||
|
||||
if (start >= end)
|
||||
break;
|
||||
|
||||
kasan_populate(kasan_mem_to_shadow(start), kasan_mem_to_shadow(end));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user