[arm:zii 20/80] drivers/net/dsa/xrs700x/xrs700x.c:714:37: warning: 'xrs700x_phylink_mac_ops' defined but not used

Russell King (Oracle) linux at armlinux.org.uk
Thu Apr 18 01:20:42 PDT 2024


On Thu, Apr 18, 2024 at 06:26:42AM +0800, kernel test robot wrote:
> All warnings (new ones prefixed by >>):
> 
> >> drivers/net/dsa/xrs700x/xrs700x.c:714:37: warning: 'xrs700x_phylink_mac_ops' defined but not used [-Wunused-const-variable=]
>      714 | static const struct phylink_mac_ops xrs700x_phylink_mac_ops = {
>          |                                     ^~~~~~~~~~~~~~~~~~~~~~~

My testing did not produce this warning, so I'm guessing that by default
the kernel does not build with this warning enabled - which seems to be
completely mad. This is not the first time that this has happened... and
it will not be the last while the kernel adopts this policy.

Your follow-up email shows that there are other warnings which will be
spat out with W=1 which will make spotting one new warning difficult,
so this isn't the answer either.

I guess we are now completely reliant on the 0-day robot finding these
cases... which sucks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list