Re: [PATCH] [v2] ne2000: fix unused function warning

From: Geert Uytterhoeven
Date: Tue Sep 07 2021 - 10:16:01 EST


On Tue, Sep 7, 2021 at 3:46 PM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Geert noticed a warning on MIPS TX49xx, Atari and presuambly other
> platforms when the driver is built-in but NETDEV_LEGACY_INIT is
> disabled:
>
> drivers/net/ethernet/8390/ne.c:909:20: warning: ‘ne_add_devices’ defined but not used [-Wunused-function]
>
> Merge the two module init functions into a single one with an
> IS_ENABLED() check to replace the incorrect #ifdef.
>
> Fixes: 4228c3942821 ("make legacy ISA probe optional")
> Reported-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> v2: do a larger rework to avoid introducing a different build error

Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Tested-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