* [PATCH] net/ncsi: use eth_zero_addr() to clear mac address
@ 2020-07-23 11:13 linmiaohe
2020-07-23 18:50 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: linmiaohe @ 2020-07-23 11:13 UTC (permalink / raw)
To: sam, 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>
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index a94bb59793f0..5b1f4ec66dd9 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -471,7 +471,7 @@ static int ncsi_rsp_handler_sma(struct ncsi_request *nr)
memcpy(&ncf->addrs[index], cmd->mac, ETH_ALEN);
} else {
clear_bit(cmd->index - 1, bitmap);
- memset(&ncf->addrs[index], 0, ETH_ALEN);
+ eth_zero_addr(&ncf->addrs[index]);
}
spin_unlock_irqrestore(&nc->lock, flags);
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/ncsi: use eth_zero_addr() to clear mac address
2020-07-23 11:13 [PATCH] net/ncsi: use eth_zero_addr() to clear mac address linmiaohe
@ 2020-07-23 18:50 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-23 18:50 UTC (permalink / raw)
To: linmiaohe; +Cc: sam, kuba, netdev, linux-kernel
From: linmiaohe <linmiaohe@huawei.com>
Date: Thu, 23 Jul 2020 19:13:43 +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:13 [PATCH] net/ncsi: use eth_zero_addr() to clear mac address linmiaohe
2020-07-23 18:50 ` 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).