From patchwork Tue Sep 19 16:17:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 113039 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp5106104qgf; Tue, 19 Sep 2017 09:19:21 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCY1myq2zCU9AsepA54tpQT6UgIpK0Womn64Xknb9vtrmT6Cb9UT+BjExbliOmZCSR5hD+2 X-Received: by 10.99.121.141 with SMTP id u135mr1787764pgc.86.1505837961781; Tue, 19 Sep 2017 09:19:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505837961; cv=none; d=google.com; s=arc-20160816; b=aum4fotZA99yAf5ffcVCFAAJoZENAqzM56K+TbsAbqqnSOB/0YgaaLCfe28YhT4Z24 Se2vXoeEtNhtTJ9nl8K9JZnLSJ68XaFNJDpsBfKNauU/i6TtWzlH5xJS5dBVxAntE9V1 zIBUVNQokEqAU4EAk4oZSA+HTO7aboDEgmonmnYeVGEhibQ8KaZxpsbKA6MhZlMNsH7i V/3Ecx7foVGv/O0S8N/Q+yHA4WU43uAn8d9TUGpPrPJSyvPF8qhwC56eXjXkTWDl56u1 rTW+GHyeHo07dXMnXkHGb46iQK7UE1+wwQ/Vho8eCaQy+es/aBuQLI9ly98h8qOVTY+A HCLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=ZZtT3JMX7UAwWgTLPVphRdEPNSRY2YE7IzzTMpcIMXg=; b=eiBaUr6nY6du4LE4wN9aGSP+1m7M/Ty/OzBDyaL3eme3ac+BPh5ePtV1OhbYtx55IQ z3kWqJMQGar8X/wcvuB6SVTgj6rhVMTmgATIZJlVMiaVQmllXQORP2WVD/a9PBLcBS4W eMw60d1WQTSbvq50KvppyggGXKHjQobxG+VoEmpKAdNMQIejTQ+E3CEvYf4b0/62zYXW 71FaL1TNoeLxNtR7Vg8+phUqi/bMcmYYdj/5OWPRTGQ7+3AG0QDwv4rvl800V0ITcVdq Q7Euhxm0FgDlBqgO2xL8gmZXSMU05FN8l7v7wus+3cRV8QIsum6koGwixmQv4WCtJ7dX OKBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t61si6878541plb.199.2017.09.19.09.19.21; Tue, 19 Sep 2017 09:19:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbdISQTU (ORCPT + 26 others); Tue, 19 Sep 2017 12:19:20 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6497 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751873AbdISQSP (ORCPT ); Tue, 19 Sep 2017 12:18:15 -0400 Received: from 172.30.72.60 (EHLO DGGEMS414-HUB.china.huawei.com) ([172.30.72.60]) by dggrg04-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DHO40858; Wed, 20 Sep 2017 00:18:12 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.203.181.154) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.301.0; Wed, 20 Sep 2017 00:18:05 +0800 From: Salil Mehta To: CC: , , , , , , , Subject: [PATCH V2 net 5/7] net: hns3: Fixes the ether address copy with appropriate API Date: Tue, 19 Sep 2017 17:17:14 +0100 Message-ID: <20170919161716.92680-6-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20170919161716.92680-1-salil.mehta@huawei.com> References: <20170919161716.92680-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.203.181.154] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.59C14345.00D8, 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: c57fef28641f6e05564b259c5880046f Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.7.4 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;