Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1735065 > unrolled thread

[PATCH V2 net 5/7] net: hns3: Fixes the ether address copy with appropriate API

Started bySalil Mehta <salil.mehta@huawei.com>
First post2017-09-19 18:20 +0200
Last post2017-09-19 18:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH V2 net 5/7] net: hns3: Fixes the ether address copy with appropriate API Salil Mehta <salil.mehta@huawei.com> - 2017-09-19 18:20 +0200

#1735065 — [PATCH V2 net 5/7] net: hns3: Fixes the ether address copy with appropriate API

FromSalil Mehta <salil.mehta@huawei.com>
Date2017-09-19 18:20 +0200
Subject[PATCH V2 net 5/7] net: hns3: Fixes the ether address copy with appropriate API
Message-ID<urtpD-7FJ-19@gated-at.bofh.it>
This patch replaces the ethernet address copy instance with more
appropriate ether_addr_copy() function.

Fixes: 6427264ef330 ("net: hns3: Add HNS3 Acceleration Engine &
Compatibility Layer Support")
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index eafd9c6..8e172af 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -1063,8 +1063,7 @@ static int hclge_configure(struct hclge_dev *hdev)
 	hdev->base_tqp_pid = 0;
 	hdev->rss_size_max = 1;
 	hdev->rx_buf_len = cfg.rx_buf_len;
-	for (i = 0; i < ETH_ALEN; i++)
-		hdev->hw.mac.mac_addr[i] = cfg.mac_addr[i];
+	ether_addr_copy(hdev->hw.mac.mac_addr, cfg.mac_addr);
 	hdev->hw.mac.media_type = cfg.media_type;
 	hdev->hw.mac.phy_addr = cfg.phy_addr;
 	hdev->num_desc = cfg.tqp_desc_num;
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web