summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorSang-Heon Jeon <ekffu200098@gmail.com>2026-07-01 00:04:09 +0900
committerMike Rapoport (Microsoft) <rppt@kernel.org>2026-07-01 09:22:40 +0300
commit8008f6995d0c0cf22e7b4d60e95fe14085c10f35 (patch)
treea535711feedeed6ea9bb34ccda513e26e696bd0a /arch/riscv
parent99e60ebe108817fd48791f2cb81f1e672ad8285b (diff)
downloadlinux-next-8008f6995d0c0cf22e7b4d60e95fe14085c10f35.tar.gz
linux-next-8008f6995d0c0cf22e7b4d60e95fe14085c10f35.zip
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>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/mm/kasan_init.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/riscv/mm/kasan_init.c b/arch/riscv/mm/kasan_init.c
index c4a2a9e5586e..1f3aa9611187 100644
--- a/arch/riscv/mm/kasan_init.c
+++ b/arch/riscv/mm/kasan_init.c
@@ -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));
}