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


Groups > linux.kernel > #1734581

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

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Salil Mehta <salil.mehta@huawei.com>
Newsgroups linux.kernel
Subject [PATCH net 5/7] net: hns3: fixes the ether address copy with more appropriate API
Date Tue, 19 Sep 2017 03:10:01 +0200
Message-ID <urfcZ-5PD-11@gated-at.bofh.it> (permalink)
References <urfcZ-5PD-7@gated-at.bofh.it>
X-Mailer git-send-email 2.8.3
MIME-Version 1.0
Content-Type text/plain
X-Originating-IP [10.47.92.71]
X-Cfilter-Loop Reflected
X-Mirapoint-Virus-Rapid-Raw score=unknown(0), refid=str=0001.0A020206.59C06DD3.0172,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-ID 3c0644f06c3cf8d70d8bb955b7965edf
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 24
Organization linux.* mail to news gateway
X-Original-Cc <salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>, <lipeng321@huawei.com>, <mehta.salil.lnk@gmail.com>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
X-Original-Date Tue, 19 Sep 2017 02:06:26 +0100
X-Original-Message-ID <20170919010628.175732-6-salil.mehta@huawei.com>
X-Original-References <20170919010628.175732-1-salil.mehta@huawei.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1734581

Show key headers only | View raw


This patch replaces the ethernet address copy instance with more
appropriate ether_addr_copy() function.

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 eafd9c678162..8e172afd4876 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.11.0

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web