summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib
diff options
context:
space:
mode:
authorDenis Orlov <denorl2009@gmail.com>2023-07-25 08:05:06 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2023-07-27 07:08:29 +0200
commit1d21d6db25c4507488acc38f38aa6762f03adae9 (patch)
treec3eccf4c7bbc50c3bf7ef592bcb3eb15569a1fb9 /arch/mips/lib
parent816729236bd0fc4cd7a11b829541270351d8f90c (diff)
downloadbarebox-1d21d6db25c4507488acc38f38aa6762f03adae9.tar.gz
barebox-1d21d6db25c4507488acc38f38aa6762f03adae9.tar.xz
MIPS: reloc: mark relocate_code() as noreturn
After relocating the code we jump straight to it, with the function having an 'unreachable()' call at the end. So add an appropriate attribute. Signed-off-by: Denis Orlov <denorl2009@gmail.com> Link: https://lore.barebox.org/20230725050618.3451-6-denorl2009@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/lib')
-rw-r--r--arch/mips/lib/reloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index 3c845a9663..83b4040d95 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -41,7 +41,7 @@
#include <asm-generic/memory_layout.h>
void main_entry(void *fdt, u32 fdt_size);
-void relocate_code(void *fdt, u32 fdt_size, u32 relocaddr);
+void __noreturn relocate_code(void *fdt, u32 fdt_size, u32 relocaddr);
/**
* read_uint() - Read an unsigned integer from the buffer
@@ -106,7 +106,7 @@ static void apply_reloc(unsigned int type, void *addr, long off)
}
}
-void relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
+void __noreturn relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
{
unsigned long addr, length, bss_len, relocaddr, new_stack;
uint8_t *buf;