All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] qed: Replace memset with eth_zero_addr
@ 2017-01-16  3:44 Shyam Saini
  2017-01-16  3:44 ` [PATCH 2/2] " Shyam Saini
  2017-01-16  4:38 ` [PATCH 1/2] " David Miller
  0 siblings, 2 replies; 8+ messages in thread
From: Shyam Saini @ 2017-01-16  3:44 UTC (permalink / raw)
  To: Yuval.Mintz; +Cc: Ariel.Elior, everest-linux-l2, netdev, Shyam Saini

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. Also, it makes the code clearer

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
---
 drivers/net/ethernet/qlogic/qed/qed_l2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_l2.c b/drivers/net/ethernet/qlogic/qed/qed_l2.c
index 6a3727c..778c52c 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_l2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_l2.c
@@ -1776,7 +1776,7 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
 	qed_fill_dev_info(cdev, &info->common);
 
 	if (IS_VF(cdev))
-		memset(info->common.hw_mac, 0, ETH_ALEN);
+		eth_zero_addr(info->common.hw_mac);
 
 	return 0;
 }
-- 
2.7.4

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

end of thread, other threads:[~2017-01-16 17:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-16  3:44 [PATCH 1/2] qed: Replace memset with eth_zero_addr Shyam Saini
2017-01-16  3:44 ` [PATCH 2/2] " Shyam Saini
2017-01-16  4:38 ` [PATCH 1/2] " David Miller
2017-01-16  9:24   ` Shyam Saini
2017-01-16 16:46     ` David Miller
2017-01-16 17:05       ` Mintz, Yuval
2017-01-16 17:12         ` David Miller
2017-01-16 17:40       ` Shyam Saini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.