Re: [PATCH AUTOSEL 4.14 20/20] mdio_bus: unhide mdio_bus_init prototype

From: Sasha Levin
Date: Thu Jun 01 2023 - 05:27:21 EST


On Thu, May 25, 2023 at 10:05:01PM +0200, Arnd Bergmann wrote:
On Thu, May 25, 2023, at 20:45, Sasha Levin wrote:
From: Arnd Bergmann <arnd@xxxxxxxx>

[ Upstream commit 2e9f8ab68f42b059e80db71266c1675c07c664bd ]

mdio_bus_init() is either used as a local module_init() entry,
or it gets called in phy_device.c. In the former case, there
is no declaration, which causes a warning:

drivers/net/phy/mdio_bus.c:1371:12: error: no previous prototype for
'mdio_bus_init' [-Werror=missing-prototypes]

Remove the #ifdef around the declaration to avoid the warning..

Hi Sasha,

While there is nothing wrong with backporting the -Wmissing-prototypes
warning fixes I sent, there is also really no point unless you
want to backport all 140 of them and then also turn on that warning
during testing.

The option is only enabled at the W=1 level or when using sparse (C=1).
I hope to get these all done in 6.5 for the most common architectures,
but I wouldn't bother putting them into stable kernels.

I'll go drop it. In general, we've been trying to avoid W=1 fixes but
sometimes they end up sneaking in, which is also okay...

--
Thanks,
Sasha