Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1514891ybh; Sun, 19 Jul 2020 23:25:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTuPiFzr/jNH0GHgs2z/IJxFljaz5aZENLjLOcaZTlA2HbS/7OF9f2IFzIfTiEmpQU2rbF X-Received: by 2002:a17:906:1492:: with SMTP id x18mr19001020ejc.545.1595226317579; Sun, 19 Jul 2020 23:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595226317; cv=none; d=google.com; s=arc-20160816; b=GRyhLVNyN6+l53z0hILuad4GzmzRDhrEfjexvAwoQBgTNSkXrk4ZP2EAXauSJpwoPN hLpbqXJJOGECnVCvapVuASankoHJMGCqcBnhiPp3hc8TRTq6jfCcSStZJuLSJSYKS4/P KLH+oFcCjGeiRpooaas6HCPgaza6HQxGaYglo1y6TXIYGPwIG/ldp3vDyl9NUPygYjqD XGI43i1Y5wAe2CMaIgHOTUzkpzN7D6XPJicX/vcyE5GgqzRZWaY62Mq9mbk2QEYCYdj4 ZsXWgRLgsAoPzJshAPf48fOOlv/sEBcmsnpR+9JRULRSZC9i56TlrjjOL2HPBQUsNwsr qSOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=iCaF3qJupd/jcztEteZmBDM/4ug5I4F013hj+toj04g=; b=zSQyRjm5kgYJx2xfGm1vKfVGPQvgczARx5BphGAA2Q7uD8thxvLvBPXhiqrUZPE7eE /hIgbn5wXTiTkZWReIQRcCZk5cM0XTeyJ+4YLjZB/WDHU3suPllQpk/5T3l2CeJP4ced XiWmBX140EyFehNj90YM7cQG8rZH7sCHPBni2HDpIfUqLoNPdr7RsCwuMnj4uhvFvbA2 ++zaQEeiPKEAw/VV5yh/Kl2HrMI/x3+W+sAyY9KBpAQB14/voOZU5nX3gsm7YeyibB80 dPPddnS+4vspgQSV+9AhA/uiOngbX1iqTyQA6j7d/VAuDBMM2KfxtUg1n/VY501mUr00 k0Gw== 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 r6si9423678ejd.213.2020.07.19.23.24.55; Sun, 19 Jul 2020 23:25: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 S1726892AbgGTGY0 (ORCPT + 99 others); Mon, 20 Jul 2020 02:24:26 -0400 Received: from smtp25.cstnet.cn ([159.226.251.25]:44744 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725805AbgGTGY0 (ORCPT ); Mon, 20 Jul 2020 02:24:26 -0400 Received: from localhost (unknown [159.226.5.99]) by APP-05 (Coremail) with SMTP id zQCowACX3g6LOBVf0Ub9AQ--.44249S2; Mon, 20 Jul 2020 14:24:12 +0800 (CST) From: Xu Wang To: yisen.zhuang@huawei.com, salil.mehta@huawei.com, davem@davemloft.net, kuba@kernel.org, vulab@iscas.ac.cn, kw@linux.com, colin.king@canonical.com, netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] net: hns: use eth_broadcast_addr() to assign broadcast address Date: Mon, 20 Jul 2020 06:24:10 +0000 Message-Id: <20200720062410.7773-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowACX3g6LOBVf0Ub9AQ--.44249S2 X-Coremail-Antispam: 1UD129KBjvdXoW7XrW5uFyxCr17AF47JryDtrb_y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ux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch is to use eth_broadcast_addr() to assign broadcast address insetad of memset(). Signed-off-by: Xu Wang --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c index 1c5243cc1dc6..acfa86e5296f 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c @@ -1724,7 +1724,7 @@ static void hns_dsaf_setup_mc_mask(struct dsaf_device *dsaf_dev, u8 port_num, u8 *mask, u8 *addr) { if (MAC_IS_BROADCAST(addr)) - memset(mask, 0xff, ETH_ALEN); + eth_broadcast_addr(mask); else memcpy(mask, dsaf_dev->mac_cb[port_num]->mc_mask, ETH_ALEN); } -- 2.17.1