ethernet: Use eth_<foo>_addr instead of memset
Use the built-in function instead of memset. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e8ab38cfcb
commit
c7bf716940
@@ -893,7 +893,7 @@ static int enic_set_vf_port(struct net_device *netdev, int vf,
|
||||
} else {
|
||||
memset(pp, 0, sizeof(*pp));
|
||||
if (vf == PORT_SELF_VF)
|
||||
memset(netdev->dev_addr, 0, ETH_ALEN);
|
||||
eth_zero_addr(netdev->dev_addr);
|
||||
}
|
||||
} else {
|
||||
/* Set flag to indicate that the port assoc/disassoc
|
||||
@@ -903,14 +903,14 @@ static int enic_set_vf_port(struct net_device *netdev, int vf,
|
||||
|
||||
/* If DISASSOCIATE, clean up all assigned/saved macaddresses */
|
||||
if (pp->request == PORT_REQUEST_DISASSOCIATE) {
|
||||
memset(pp->mac_addr, 0, ETH_ALEN);
|
||||
eth_zero_addr(pp->mac_addr);
|
||||
if (vf == PORT_SELF_VF)
|
||||
memset(netdev->dev_addr, 0, ETH_ALEN);
|
||||
eth_zero_addr(netdev->dev_addr);
|
||||
}
|
||||
}
|
||||
|
||||
if (vf == PORT_SELF_VF)
|
||||
memset(pp->vf_mac, 0, ETH_ALEN);
|
||||
eth_zero_addr(pp->vf_mac);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user