[PATCH 4/6] riscv: remove unreachable invalid range check in kasan_init()

Andrey Ryabinin ryabinin.a.a at gmail.com
Mon Jun 22 09:53:12 PDT 2026


Sang-Heon Jeon <ekffu200098 at gmail.com> writes:

> 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 at gmail.com>
> ---
>  arch/riscv/mm/kasan_init.c | 3 ---
>  1 file changed, 3 deletions(-)
>

Reviewed-by: Andrey Ryabinin <ryabinin.a.a at gmail.com>



More information about the linux-riscv mailing list