From: Xi Ruoyao Date: Sat, 20 Jul 2024 14:41:07 +0000 (+0800) Subject: LoongArch: Remove a redundant checking in relocator X-Git-Tag: v6.11-rc1~76^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ad158e4ef769c5f261cbf791e0005d69fc3b785;p=thirdparty%2Flinux.git LoongArch: Remove a redundant checking in relocator With our linker script "relocated_addr >= VMLINUX_LOAD_ADDRESS" should be always true. Signed-off-by: Xi Ruoyao Signed-off-by: Huacai Chen --- diff --git a/arch/loongarch/kernel/relocate.c b/arch/loongarch/kernel/relocate.c index d142061c61d42..e3836f0b9bd85 100644 --- a/arch/loongarch/kernel/relocate.c +++ b/arch/loongarch/kernel/relocate.c @@ -35,9 +35,7 @@ static inline void __init relocate_relative(void) if (rela->r_info != R_LARCH_RELATIVE) continue; - if (relocated_addr >= VMLINUX_LOAD_ADDRESS) - relocated_addr = (Elf64_Addr)RELOCATED(relocated_addr); - + relocated_addr = (Elf64_Addr)RELOCATED(relocated_addr); *(Elf64_Addr *)RELOCATED(addr) = relocated_addr; } }