Re: [PATCH] sh: add missing EXPORT_SYMBOL() for __delay

From: Geert Uytterhoeven
Date: Thu Dec 12 2019 - 02:43:18 EST


Hi Morimoto-san,

On Thu, Dec 12, 2019 at 3:38 AM Kuninori Morimoto
<kuninori.morimoto.gx@xxxxxxxxxxx> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
>
> __delay() is used from kernel module.
> We need EXPORT_SYMBOL(), otherwise we will get compile error.
>
> ERROR: "__delay" [drivers/net/phy/mdio-cavium.ko] undefined!
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

Thanks for your patch!

> --- a/arch/sh/lib/delay.c
> +++ b/arch/sh/lib/delay.c
> @@ -29,6 +29,7 @@ void __delay(unsigned long loops)
> : "0" (loops)
> : "t");
> }
> +EXPORT_SYMBOL(__delay);
>
> inline void __const_udelay(unsigned long xloops)
> {

I believe the correct fix is make drivers/net/phy/mdio-cavium.c use one
of [nmu]delay() instead.

Cfr.
https://lore.kernel.org/lkml/CAMuHMdUERaoHLNKi03zCuYi7NevgBFjXrV=pt0Yy=HOeRiL25Q@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