netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net
Cc: Miaohe Lin <linmiaohe@huawei.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jeffrey.t.kirsher@intel.com, anthony.l.nguyen@intel.com,
	Aaron Brown <aaron.f.brown@intel.com>
Subject: [net-next 12/12] igb: use eth_zero_addr() to clear mac address
Date: Thu, 30 Jul 2020 13:37:20 -0700	[thread overview]
Message-ID: <20200730203720.3843018-13-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20200730203720.3843018-1-anthony.l.nguyen@intel.com>

From: Miaohe Lin <linmiaohe@huawei.com>

Use eth_zero_addr() to clear mac address instead of memset().

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 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 ae8d64324619..b97916b91aba 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -7159,7 +7159,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);
 	}
@@ -7308,7 +7308,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.26.2


  parent reply	other threads:[~2020-07-30 20:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 20:37 [net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-30 Tony Nguyen
2020-07-30 20:37 ` [net-next 01/12] iavf: use generic power management Tony Nguyen
2020-07-30 20:37 ` [net-next 02/12] igbvf: " Tony Nguyen
2020-07-30 20:37 ` [net-next 03/12] ixgbe: " Tony Nguyen
2020-07-30 20:37 ` [net-next 04/12] ixgbevf: " Tony Nguyen
2020-07-30 20:37 ` [net-next 05/12] e100: " Tony Nguyen
2020-07-30 20:37 ` [net-next 06/12] e1000: Remove unnecessary usages of memset Tony Nguyen
2020-07-30 20:37 ` [net-next 07/12] e1000e: " Tony Nguyen
2020-07-30 20:37 ` [net-next 08/12] igb: " Tony Nguyen
2020-07-30 20:37 ` [net-next 09/12] ixgbe: " Tony Nguyen
2020-07-30 20:37 ` [net-next 10/12] Documentation: intel: Replace HTTP links with HTTPS ones Tony Nguyen
2020-07-30 20:37 ` [net-next 11/12] ixgbe: use eth_zero_addr() to clear mac address Tony Nguyen
2020-07-30 20:37 ` Tony Nguyen [this message]
2020-07-31 23:59 ` [net-next 00/12][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-30 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200730203720.3843018-13-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=aaron.f.brown@intel.com \
    --cc=davem@davemloft.net \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=linmiaohe@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).