aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-16 14:43:18 +0800
committerDavid S. Miller <davem@davemloft.net>2021-06-16 00:53:17 -0700
commitc7654495916e109f76a67fd3ae68f8fa70ab4faa (patch)
tree39ec40dbdf01e087ed364aba0f8d80e8926e5499
parentMerge branch 'cosa-cleanups' (diff)
downloadwireguard-linux-c7654495916e109f76a67fd3ae68f8fa70ab4faa.tar.xz
wireguard-linux-c7654495916e109f76a67fd3ae68f8fa70ab4faa.zip
net: chelsio: cxgb4: use eth_zero_addr() to assign zero address
Using eth_zero_addr() to assign zero address insetad of inefficient copy from an array. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4_hw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index ae3ad99fbd06..9e3ea5f7be2e 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -7782,7 +7782,6 @@ int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid,
int idx, bool sleep_ok)
{
struct fw_vi_mac_exact *p;
- u8 addr[] = {0, 0, 0, 0, 0, 0};
struct fw_vi_mac_cmd c;
int ret = 0;
u32 exact;
@@ -7799,7 +7798,7 @@ int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid,
p = c.u.exact;
p->valid_to_idx = cpu_to_be16(FW_VI_MAC_CMD_VALID_F |
FW_VI_MAC_CMD_IDX_V(idx));
- memcpy(p->macaddr, addr, sizeof(p->macaddr));
+ eth_zero_addr(p->macaddr);
ret = t4_wr_mbox_meat(adap, adap->mbox, &c, sizeof(c), &c, sleep_ok);
return ret;
}