ixgbe: use eth_zero_addr() to clear mac address
authorMiaohe Lin <linmiaohe@huawei.com>
Mon, 20 Jul 2020 08:27:41 +0000 (16:27 +0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 30 Jul 2020 18:40:08 +0000 (11:40 -0700)
Use eth_zero_addr() to clear mac address instead of memset().

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c

index 23a92656821de44640b59102e0b690a40d154dcb..988db46bff0eec77c37ef58112b4d8950f7a67dd 100644 (file)
@@ -783,7 +783,7 @@ static int ixgbe_set_vf_mac(struct ixgbe_adapter *adapter,
                memcpy(adapter->vfinfo[vf].vf_mac_addresses, mac_addr,
                       ETH_ALEN);
        else
-               memset(adapter->vfinfo[vf].vf_mac_addresses, 0, ETH_ALEN);
+               eth_zero_addr(adapter->vfinfo[vf].vf_mac_addresses);
 
        return retval;
 }