@@ -80,7 +80,7 @@ struct loader_info {
};
extern struct loader_info loader_info;
-void start(void);
+void __noreturn start(void);
void fdt_init(void *blob);
int serial_console_init(void);
int ns16550_console_init(void *devp, struct serial_console_data *scdp);
@@ -217,7 +217,7 @@ static inline void free(void *ptr)
platform_ops.free(ptr);
}
-static inline void exit(void)
+static inline void __noreturn exit(void)
{
if (platform_ops.exit)
platform_ops.exit();
@@ -45,7 +45,7 @@ static void ps3_console_write(const char *buf, int len)
{
}
-static void ps3_exit(void)
+static void __noreturn ps3_exit(void)
{
printf("ps3_exit\n");
@@ -100,7 +100,7 @@ void ps3_copy_vectors(void)
flush_cache((void *)0x100, 512);
}
-void platform_init(void)
+void __noreturn platform_init(void)
{
const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */
void *chosen;
Mark start(), exit(), ps3_exit(), and the PS3 platform_init() as __noreturn to document that they never return and to potentially improve compiler optimizations. Signed-off-by: Thorsten Blum <blum@kernel.org> --- Changes in v2: - Update patch subject and description - Mark start() and platform_init() as __noreturn - v1: https://lore.kernel.org/r/20260807152353.306889-2-thorsten.blum@linux.dev/ arch/powerpc/boot/ops.h | 4 ++-- arch/powerpc/boot/ps3.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)