staging: use of_get_ethdev_address()
authorJakub Kicinski <kuba@kernel.org>
Tue, 26 Oct 2021 17:50:38 +0000 (10:50 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Oct 2021 00:13:12 +0000 (17:13 -0700)
Use the new of_get_ethdev_address() helper for the cases
where dev->dev_addr is passed in directly as the destination.

  @@
  expression dev, np;
  @@
  - of_get_mac_address(np, dev->dev_addr)
  + of_get_ethdev_address(np, dev)

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211026175038.3197397-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/staging/octeon/ethernet.c

index 5d24c1b..d5785c0 100644 (file)
@@ -409,7 +409,7 @@ int cvm_oct_common_init(struct net_device *dev)
        struct octeon_ethernet *priv = netdev_priv(dev);
        int ret;
 
-       ret = of_get_mac_address(priv->of_node, dev->dev_addr);
+       ret = of_get_ethdev_address(priv->of_node, dev);
        if (ret)
                eth_hw_addr_random(dev);