Re: [PATCH net 11/16] net: ethernet: marvell: mvneta: fix fixed-link phydev leaks

From: Naresh Kamboju
Date: Thu May 07 2020 - 18:05:18 EST


On Thu, 7 May 2020 at 16:43, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
<trim>
> > >
> > > Greg, 3f65047c853a ("of_mdio: add helper to deregister fixed-link
> > > PHYs") needs to be backported as well for these.
> > >
> > > Original series can be found here:
> > >
> > > https://lkml.kernel.org/r/1480357509-28074-1-git-send-email-johan@xxxxxxxxxx
> >
> > Ah, thanks for that, I thought I dropped all of the ones that caused
> > build errors, but missed the above one. I'll go take the whole series
> > instead.
>
> This should now all be fixed up, thanks.

While building kernel Image for arm architecture on stable-rc 4.4 branch
the following build error found.

of_mdio: add helper to deregister fixed-link PHYs
commit 3f65047c853a2a5abcd8ac1984af3452b5df4ada upstream.

Add helper to deregister fixed-link PHYs registered using
of_phy_register_fixed_link().

Convert the two drivers that care to deregister their fixed-link PHYs to
use the new helper, but note that most drivers currently fail to do so.

Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
[only take helper function for 4.4.y - gregkh]

# make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache
arm-linux-gnueabihf-gcc" O=build zImage
70 #
71 ../drivers/of/of_mdio.c: In function âof_phy_deregister_fixed_linkâ:
72 ../drivers/of/of_mdio.c:379:2: error: implicit declaration of
function âfixed_phy_unregisterâ; did you mean âfixed_phy_registerâ?
[-Werror=implicit-function-declaration]
73 379 | fixed_phy_unregister(phydev);
74 | ^~~~~~~~~~~~~~~~~~~~
75 | fixed_phy_register
76 ../drivers/of/of_mdio.c:381:22: error: âstruct phy_deviceâ has no
member named âmdioâ; did you mean âmdixâ?
77 381 | put_device(&phydev->mdio.dev); /* of_phy_find_device() */
78 | ^~~~
79 | mdix

>
> greg k-h