Re: [PATCH 1/3] arch: Export machine_restart() instances so they can be called from modules

From: Geert Uytterhoeven
Date: Mon Aug 09 2021 - 11:15:31 EST


On Tue, Aug 3, 2021 at 5:56 PM Lee Jones <lee.jones@xxxxxxxxxx> wrote:
> A recent attempt to convert the Power Reset Restart driver to tristate
> failed because of the following compile error (reported once merged by
> Stephen Rothwell via Linux Next):
>
> ERROR: "machine_restart" [drivers/power/reset/restart-poweroff.ko] undefined!
>
> This error occurs since some of the machine_restart() instances are
> not currently exported for use in modules. This patch aims to rectify
> that.
>
> Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>

> NB: If it's safe to omit some of these, let me know and I'll revise the patch.

How do you plan to handle that? Isn't this an all-or-nothing export?

> arch/m68k/kernel/process.c | 1 +

Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

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