summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShyam Saini <mayhs11saini@gmail.com>2017-01-16 04:56:21 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-16 17:46:54 +0100
commit4b5b1ac5c0b7e565ea5ef0031439bffedce12ff9 (patch)
tree92e55d5942b02558d6d02cb8d27156be63d659c9 /drivers
parentstmmac: indent an if statement (diff)
downloadlinux-4b5b1ac5c0b7e565ea5ef0031439bffedce12ff9.tar.xz
linux-4b5b1ac5c0b7e565ea5ef0031439bffedce12ff9.zip
sfc: Replace memset with eth_zero_addr
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/sfc/ef10_sriov.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c
index a55c53d6f559..ed4b14283461 100644
--- a/drivers/net/ethernet/sfc/ef10_sriov.c
+++ b/drivers/net/ethernet/sfc/ef10_sriov.c
@@ -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;
}