mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
powerpc64/kasan: Remove unreachable invalid range check in kasan_init_phys_region()
kasan_init() maps each memblock region with for_each_mem_range() and passes it to kasan_init_phys_region(), which does nothing 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> Link: https://patch.msgid.link/20260630150413.1718632-7-ekffu200098@gmail.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
This commit is contained in:
parent
3db1a9ccf9
commit
21e95a4b6f
|
|
@ -68,9 +68,6 @@ static void __init kasan_init_phys_region(void *start, void *end)
|
|||
unsigned long k_start, k_end, k_cur;
|
||||
void *va;
|
||||
|
||||
if (start >= end)
|
||||
return;
|
||||
|
||||
k_start = ALIGN_DOWN((unsigned long)kasan_mem_to_shadow(start), PAGE_SIZE);
|
||||
k_end = ALIGN((unsigned long)kasan_mem_to_shadow(end), PAGE_SIZE);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,6 @@ static void __init kasan_init_phys_region(void *start, void *end)
|
|||
unsigned long k_start, k_end, k_cur;
|
||||
void *va;
|
||||
|
||||
if (start >= end)
|
||||
return;
|
||||
|
||||
k_start = ALIGN_DOWN((unsigned long)kasan_mem_to_shadow(start), PAGE_SIZE);
|
||||
k_end = ALIGN((unsigned long)kasan_mem_to_shadow(end), PAGE_SIZE);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user