public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sfc: Replace memset with eth_zero_addr
@ 2016-01-19 23:27 Lucas Tanure
  2016-01-20  9:44 ` Bert Kenward
  2016-01-20 11:44 ` Sergei Shtylyov
  0 siblings, 2 replies; 5+ messages in thread
From: Lucas Tanure @ 2016-01-19 23:27 UTC (permalink / raw)
  To: Shradha Shah; +Cc: Solarflare linux maintainers, netdev, linux-kernel

Use eth_zero_addr to assign the zero address to the given address array
instead of memset when second argument is address of zero.

Signed-off-by: Lucas Tanure <tanure@linux.com>
---
 drivers/net/ethernet/sfc/ef10_sriov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c
index 3c17f27..10f60db 100644
--- a/drivers/net/ethernet/sfc/ef10_sriov.c
+++ b/drivers/net/ethernet/sfc/ef10_sriov.c
@@ -527,7 +527,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;
 }
 
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-20 11:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-19 23:27 [PATCH] sfc: Replace memset with eth_zero_addr Lucas Tanure
2016-01-20  9:44 ` Bert Kenward
2016-01-20 10:25   ` David Miller
2016-01-20 11:44 ` Sergei Shtylyov
2016-01-20 11:49   ` Lucas Tanure

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox