* [PATCH] cxgb4: use eth_zero_addr() to clear mac address
@ 2020-07-23 11:05 linmiaohe
2020-07-23 18:49 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: linmiaohe @ 2020-07-23 11:05 UTC (permalink / raw)
To: vishal, davem, kuba; +Cc: netdev, linux-kernel, linmiaohe
From: Miaohe Lin <linmiaohe@huawei.com>
Use eth_zero_addr() to clear mac address insetad of memset().
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
drivers/net/ethernet/chelsio/cxgb4/smt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/smt.c b/drivers/net/ethernet/chelsio/cxgb4/smt.c
index cbe72ed27b1e..e617e4aabbcc 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/smt.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/smt.c
@@ -55,7 +55,7 @@ struct smt_data *t4_init_smt(void)
for (i = 0; i < s->smt_size; ++i) {
s->smtab[i].idx = i;
s->smtab[i].state = SMT_STATE_UNUSED;
- memset(&s->smtab[i].src_mac, 0, ETH_ALEN);
+ eth_zero_addr(s->smtab[i].src_mac);
spin_lock_init(&s->smtab[i].lock);
s->smtab[i].refcnt = 0;
}
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cxgb4: use eth_zero_addr() to clear mac address
2020-07-23 11:05 [PATCH] cxgb4: use eth_zero_addr() to clear mac address linmiaohe
@ 2020-07-23 18:49 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-23 18:49 UTC (permalink / raw)
To: linmiaohe; +Cc: vishal, kuba, netdev, linux-kernel
From: linmiaohe <linmiaohe@huawei.com>
Date: Thu, 23 Jul 2020 19:05:00 +0800
> From: Miaohe Lin <linmiaohe@huawei.com>
>
> Use eth_zero_addr() to clear mac address insetad of memset().
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-23 18:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 11:05 [PATCH] cxgb4: use eth_zero_addr() to clear mac address linmiaohe
2020-07-23 18:49 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).