]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ethernet: broadcom/sb1250-mac: don't write directly to netdev->dev_addr
authorJakub Kicinski <kuba@kernel.org>
Wed, 26 Jan 2022 00:37:58 +0000 (16:37 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Jan 2022 15:40:01 +0000 (15:40 +0000)
netdev->dev_addr is const now.

Compile tested bigsur_defconfig and sb1250_swarm_defconfig.

Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/sb1250-mac.c

index f38f40eb966e3cd70dbdafc0caa458e75651fe90..a1a38456c9a33aad0eb1afbe228dbe11d56ca1da 100644 (file)
@@ -2183,9 +2183,7 @@ static int sbmac_init(struct platform_device *pldev, long long base)
                ea_reg >>= 8;
        }
 
-       for (i = 0; i < 6; i++) {
-               dev->dev_addr[i] = eaddr[i];
-       }
+       eth_hw_addr_set(dev, eaddr);
 
        /*
         * Initialize context (get pointers to registers and stuff), then