Re: [PATCH v2] m68k: amiga: Mark amiga_reset() as __noreturn
From: Geert Uytterhoeven
Date: Mon Jun 29 2026 - 03:33:09 EST
Hi Thorsten,
Thanks for your patch!
On Fri, 26 Jun 2026 at 16:58, Thorsten Blum <thorsten.blum@xxxxxxxxx> wrote:
> [PATCH v2] m68k: amiga: Mark amiga_reset() as __noreturn
This is not what this patch does, as amiga_reset() is already marked
__noreturn.
> Mark both the forward declaration and the function definition as
> __noreturn, and remove the redundant redeclaration.
Why both? No other static function (except for xen_pv_play_dead)
is tagged __noreturn in both the forward declaration and the
implementation.
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
> --- a/arch/m68k/amiga/config.c
> +++ b/arch/m68k/amiga/config.c
> @@ -96,7 +96,7 @@ static char amiga_model_name[13] = "Amiga ";
> static void amiga_sched_init(void);
> static void amiga_get_model(char *model);
> static void amiga_get_hardware_list(struct seq_file *m);
> -static void amiga_reset(void);
> +static void __noreturn amiga_reset(void);
> static void amiga_mem_console_write(struct console *co, const char *b,
> unsigned int count);
> #ifdef CONFIG_HEARTBEAT
> @@ -543,9 +543,7 @@ static u64 amiga_read_clk(struct clocksource *cs)
> return ticks;
> }
>
> -static void amiga_reset(void) __noreturn;
> -
> -static void amiga_reset(void)
> +static void __noreturn amiga_reset(void)
> {
> unsigned long jmp_addr040 = virt_to_phys(&&jmp_addr_label040);
> unsigned long jmp_addr = virt_to_phys(&&jmp_addr_label);
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds