Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1571461ybh; Mon, 20 Jul 2020 01:29:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjxUna1XIdDKIFOovK/rCd4x8fS9dsWR9+pNO7dedsg/SiedGjTZoQ/og/kBA7tDHp7ZPn X-Received: by 2002:a17:906:d92a:: with SMTP id rn10mr16846869ejb.169.1595233757891; Mon, 20 Jul 2020 01:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595233757; cv=none; d=google.com; s=arc-20160816; b=XtSfqM6/6K8NsxVZz/gm0kQrJJnzn2LKiysfUKXp/yP4m19UXjn614FioM4ZNR2nIP +StncaA1pSjiOMTZ2Rso6+E/9Errt+sXX/SvLTmTS4KrcnOdrmewpVLC7JI3coI+73Yo pSY/YS2e5mDa7NqG8FR1jEXZYrAm5/kPFoW+IcgWSqElgeJcTyRpxgoh5PyneJk3xrWw p7Y3CfgH/5m9kNzgM4QACdgzvGjGV9atD+Ib7VHD8NptSVF2RkTQNM3yo1wud/ZyxKI3 LSpU7O4iF4gWDRYg+/NTV8uWFu2pBBOrz+jrR13bDSBLUBzpcAD2gRc1rbMW8JygUMFk K6pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=n8ZmpR0uSWSXTsEY3QtWMUepkpTgaU6cVHOGOwx9ito=; b=XyXu9mSFwYfpCelFZB9JgFLjDEpgPTv7LRbKrU+7oyrI7pHB5vljfduHvlimAHoX// LWNA8Z5deWWPHT+IxlEEjNYMagYsnaeweT/HXaE4tKIgWPzDjzn0ZqR3pxsWqPo1LG0S JlrUz70IlVZIUTiI9vJZacGJJJ1M/XmusZdnIv//IraDug7X+HTTXrdzeqp+H3YLbZ44 i/PyVu5wWfjdFkvCsbLAWo6vGN3/rSjVEfcaaAg5MoJM9W569AhQei9nCVnYdI7CqDuQ WlRP0Tho8w3LdPUdYHdAxxDRTujlMSsC/j8MrDNMcUaJyaTPnazoNlBUONNMLI3gNz1U PCJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mf17si9922519ejb.86.2020.07.20.01.28.55; Mon, 20 Jul 2020 01:29:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727901AbgGTI0f (ORCPT + 99 others); Mon, 20 Jul 2020 04:26:35 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:33636 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727863AbgGTI0f (ORCPT ); Mon, 20 Jul 2020 04:26:35 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 00BE0729A02F365A998C; Mon, 20 Jul 2020 16:26:33 +0800 (CST) Received: from huawei.com (10.175.101.6) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Jul 2020 16:26:25 +0800 From: linmiaohe To: , , CC: , , , Subject: [PATCH] igb: use eth_zero_addr() to clear mac address Date: Mon, 20 Jul 2020 16:29:14 +0800 Message-ID: <1595233754-13765-1-git-send-email-linmiaohe@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.101.6] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miaohe Lin Use eth_zero_addr() to clear mac address insetad of memset(). Signed-off-by: Miaohe Lin --- drivers/net/ethernet/intel/igb/igb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 8bb3db2cbd41..adedd98f1e3e 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -7168,7 +7168,7 @@ static void igb_flush_mac_table(struct igb_adapter *adapter) for (i = 0; i < hw->mac.rar_entry_count; i++) { adapter->mac_table[i].state &= ~IGB_MAC_STATE_IN_USE; - memset(adapter->mac_table[i].addr, 0, ETH_ALEN); + eth_zero_addr(adapter->mac_table[i].addr); adapter->mac_table[i].queue = 0; igb_rar_set_index(adapter, i); } @@ -7317,7 +7317,7 @@ static int igb_del_mac_filter_flags(struct igb_adapter *adapter, } else { adapter->mac_table[i].state = 0; adapter->mac_table[i].queue = 0; - memset(adapter->mac_table[i].addr, 0, ETH_ALEN); + eth_zero_addr(adapter->mac_table[i].addr); } igb_rar_set_index(adapter, i); -- 2.19.1