From patchwork Tue Sep 19 01:06:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 112962 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4322653qgf; Mon, 18 Sep 2017 18:09:35 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCcat7YDyKNEo+F3lXyEwqpKT2yAMSltCsdn0yfwt1fjTQv1pcBYX8ViCrm0LUb5gjWKv2g X-Received: by 10.84.216.6 with SMTP id m6mr402940pli.143.1505783375257; Mon, 18 Sep 2017 18:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505783375; cv=none; d=google.com; s=arc-20160816; b=zEjQ87uUmBgZOnwJ5FzHIwPQhP9f/fhQPdjUNlyenP42TDehtR9013w84AHp0joMFr 3j8+oOpbLFbr4bJlYu+ubiunCtxEMI1p6OYJz9y6X3bP9ygunEnu4CR1DeNKTGioNZK6 tl8hiD86pJzFhoopGjJKibpcGjO93BFaeXNWCBq6q3WtLcRWzQC7Sg/l3j9fmFCm463C vR+CsEo6HOSCJycuIafbvYGlQD1p36XRU5fma0gr+pLb8UTPGfrkjS1sYiYy9lnICzOx ou6t8DmEK44RBHjoNB5gpoKWfNUXeOP4bbtn9bgY1FSSxU+9vQo6Rk75a5nGhvMTePCj XEgg== 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=60HPu66eQUZL4Rt+d6kTp8bom0GG2lznsqJLP/KLZkY=; b=I8VzGEOUm9oL6m20uuWQYMmRbcnDKY9Ty4WMlKKMb9VnZBkgb2LundT/R7Z4nQwOa4 Tp9TslmCu+KvrU2B3EIoStWJkfirC1V4kcXOR5XmQUkobW7NtDL+580RrbFTKfrev7e5 bMOX2GBRzRsPnbSR/fVTY4G1/UETt9Ot2Qe7wB3/2GlakprSZNZL9sBnyJksalAmH/dZ WOzU6uc8P2IH1o/yO1jG9TboZf1k5/A9u53ujc9DW6DtJBnWnbz+qRTbez5tA8MYvCOE JVIB0FVRiMEu1Em1OP9IVFgWzUSUk+elTkl+ZseEkAMaGYb/WKDurvf63f1eUfUlki/N rBgw== 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 b14si469476pfe.412.2017.09.18.18.09.35; Mon, 18 Sep 2017 18:09:35 -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 S1751512AbdISBHh (ORCPT + 26 others); Mon, 18 Sep 2017 21:07:37 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6070 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751431AbdISBHd (ORCPT ); Mon, 18 Sep 2017 21:07:33 -0400 Received: from 172.30.72.60 (EHLO DGGEMS411-HUB.china.huawei.com) ([172.30.72.60]) by dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DHO21288; Tue, 19 Sep 2017 09:07:31 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.47.92.71) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.301.0; Tue, 19 Sep 2017 09:07:23 +0800 From: Salil Mehta To: CC: , , , , , , , Subject: [PATCH net 5/7] net: hns3: fixes the ether address copy with more appropriate API Date: Tue, 19 Sep 2017 02:06:26 +0100 Message-ID: <20170919010628.175732-6-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20170919010628.175732-1-salil.mehta@huawei.com> References: <20170919010628.175732-1-salil.mehta@huawei.com> MIME-Version: 1.0 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: 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. Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.11.0 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;