Skip to content

Commit

Permalink
LoongArch: Remove dead code in relocate_new_kernel
Browse files Browse the repository at this point in the history
The initial aim is to silence the following objtool warning:

arch/loongarch/kernel/relocate_kernel.o: warning: objtool: relocate_new_kernel+0x74: unreachable instruction

There are two adjacent "b" instructions, the second one is unreachable,
it is dead code, just remove it.

Co-developed-by: Jinyang He <hejinyang@loongson.cn>
Signed-off-by: Jinyang He <hejinyang@loongson.cn>
Co-developed-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
  • Loading branch information
Tiezhu Yang authored and chenhuacai committed Sep 20, 2023
1 parent 3563b47 commit d0b933a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/loongarch/kernel/relocate_kernel.S
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ copy_word:
LONG_ADDI s5, s5, -1
beqz s5, process_entry
b copy_word
b process_entry

done:
ibar 0
Expand Down

0 comments on commit d0b933a

Please sign in to comment.