ethernet: manually convert memcpy(dev_addr,..., sizeof(addr))
A handful of drivers use sizeof(addr) for the size of the address, after manually confirming the size is indeed 6 convert them to eth_hw_addr_set(). Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Petko Manolov <petkan@nucleusys.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -313,7 +313,7 @@ static void macb_get_hwaddr(struct macb *bp)
|
||||
addr[5] = (top >> 8) & 0xff;
|
||||
|
||||
if (is_valid_ether_addr(addr)) {
|
||||
memcpy(bp->dev->dev_addr, addr, sizeof(addr));
|
||||
eth_hw_addr_set(bp->dev, addr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user