]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
sfc: Replace memset with eth_zero_addr
authorShyam Saini <mayhs11saini@gmail.com>
Mon, 16 Jan 2017 03:56:21 +0000 (09:26 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Jan 2017 16:46:54 +0000 (11:46 -0500)
Use eth_zero_addr to assign zero address to the given address array
instead of memset when the second argument in memset is address
of zero which makes the code clearer and also add header
file linux/etherdevice.h

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
Acked-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef10_sriov.c

index a55c53d6f5594e748ade380a551884a4048c3891..ed4b14283461357390e000d3947c05ebf20f8d61 100644 (file)
@@ -6,6 +6,7 @@
  * under the terms of the GNU General Public License version 2 as published
  * by the Free Software Foundation, incorporated herein by reference.
  */
+#include <linux/etherdevice.h>
 #include <linux/pci.h>
 #include <linux/module.h>
 #include "net_driver.h"
@@ -554,7 +555,7 @@ int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf_i, u8 *mac)
        return 0;
 
 fail:
-       memset(vf->mac, 0, ETH_ALEN);
+       eth_zero_addr(vf->mac);
        return rc;
 }