net: dsa: xrs700x: fix missing initialisation of ds->phylink_mac_ops
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 18 Apr 2024 10:51:21 +0000 (11:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2024 11:11:17 +0000 (12:11 +0100)
The kernel build bot identified the following mistake in the recently
merged 860a9bed2651 ("net: dsa: xrs700x: provide own phylink MAC
operations") patch:

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 = {
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~

Fix the omitted assignment of ds->phylink_mac_ops.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/xrs700x/xrs700x.c

index 6605fa44bcf0c3e02b9b6cda387ef2d683126528..de3b768f2ff9c0a633d7d1eb294e76f7adbb888a 100644 (file)
@@ -780,6 +780,7 @@ struct xrs700x *xrs700x_switch_alloc(struct device *base, void *devpriv)
        INIT_DELAYED_WORK(&priv->mib_work, xrs700x_mib_work);
 
        ds->ops = &xrs700x_ops;
+       ds->phylink_mac_ops = &xrs700x_phylink_mac_ops;
        ds->priv = priv;
        priv->dev = base;