Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp792081imm; Fri, 29 Jun 2018 06:31:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfobF0mnKkkBApNBeL1fL62M8KLnu7w9x8L0eyQnbHpslye6flbu5/UmX1WANwSdMeQSzoa X-Received: by 2002:a17:902:b7c5:: with SMTP id v5-v6mr7082234plz.30.1530279103007; Fri, 29 Jun 2018 06:31:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530279102; cv=none; d=google.com; s=arc-20160816; b=qL0UJsZkJmT7RH6M7lcCAW3GmD2tyrSezLuQ9qT8W3/yExtH7mKji6abcEtqI8YO+F ImoRKGl4lY6S/XSaM8qziXsyUvWKdcMaCwfXaoqM56nDtQA9p2y3x1YGs4LFca4rg2i8 URSPUkJbf9aafgelrpT8HE+KM2PtIAphVCaZwY+lui06jN6eyPtUwWFw16hrvDZmRCd7 GLCcfW6WqTBVVqwoBk4+Ab4Uilk34YmVlFUb6IyzENKqH1UlaABdgc+jT1UVJX2xx8FM K93bf7kxj4BU5NogtDyZFmOMpfYCIojKvgez/EKkB30F08vIABMifhj1vHYei1XJO/8f s4Bg== 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=vdv0/NzyJpL1I+Kfgs1iKOSryWxqd+zroJvn36GktWM=; b=Tq+u6V0uiGZP+GP+DZUHB0PxFMhXPdpGPKoSh5FljbFSWnEjmFU0GjdDQESj8pv4Ko SRSNEJBmCHKJxOODixfT5oOqLYH/nedkmhpf4hUlMd8MyeMa0gjoJZuQRNI1+ojs43Ur of1/E9bvM2SwtiFofussTKqG9GCcT7hbCM3s5JdXHRsORsHkDjY5d2ZTjFCLf89yNZUf 2bty+0YsrVFRtHaFzYRMrr7zS7aVUNzYuEMtd3z5/fJT6CztFtjMEda/rjz755RGo2WN 5JdN4colwOOzYAQbeoEJZMRBfNLT3zSk6DQAMn0jwos40cVBEA45DU3TJ4c5mVFNKN0Z PBUw== 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 u4-v6si5054080plz.354.2018.06.29.06.31.28; Fri, 29 Jun 2018 06:31:42 -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 S935225AbeF2Kyx (ORCPT + 99 others); Fri, 29 Jun 2018 06:54:53 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:60002 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932718AbeF2Kyt (ORCPT ); Fri, 29 Jun 2018 06:54:49 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2B9CACB461FC8; Fri, 29 Jun 2018 18:54:46 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.382.0; Fri, 29 Jun 2018 18:51:22 +0800 From: Peng Li To: CC: , , , , , Subject: [PATCH net-next 03/10] net: hns3: remove some redundant assignments Date: Fri, 29 Jun 2018 19:22:58 +0800 Message-ID: <1530271385-49668-4-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530271385-49668-1-git-send-email-lipeng321@huawei.com> References: <1530271385-49668-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan Remove some redundant assignments. desc->flag = cpu_to_le16(HCLGE_CMD_FLAG_NO_INTR | HCLGE_CMD_FLAG_IN) has set bit HCLGE_CMD_FLAG_WR to zero, so does others. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 2 -- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 -------- 2 files changed, 10 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c index 969966c..054a913 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c @@ -110,8 +110,6 @@ void hclge_cmd_setup_basic_desc(struct hclge_desc *desc, if (is_read) desc->flag |= cpu_to_le16(HCLGE_CMD_FLAG_WR); - else - desc->flag &= cpu_to_le16(~HCLGE_CMD_FLAG_WR); } static void hclge_cmd_config_regs(struct hclge_cmq_ring *ring) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 14a6991..b7f6960 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -2733,7 +2733,6 @@ int hclge_func_reset_cmd(struct hclge_dev *hdev, int func_id) int ret; hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_CFG_RST_TRIGGER, false); - hnae_set_bit(req->mac_func_reset, HCLGE_CFG_RESET_MAC_B, 0); hnae_set_bit(req->mac_func_reset, HCLGE_CFG_RESET_FUNC_B, 1); req->fun_reset_vfid = func_id; @@ -4264,16 +4263,9 @@ int hclge_add_uc_addr_common(struct hclge_vport *vport, memset(&req, 0, sizeof(req)); hnae_set_bit(req.flags, HCLGE_MAC_VLAN_BIT0_EN_B, 1); - hnae_set_bit(req.entry_type, HCLGE_MAC_VLAN_BIT0_EN_B, 0); - hnae_set_bit(req.entry_type, HCLGE_MAC_VLAN_BIT1_EN_B, 0); - hnae_set_bit(req.mc_mac_en, HCLGE_MAC_VLAN_BIT0_EN_B, 0); - hnae_set_bit(egress_port, HCLGE_MAC_EPORT_SW_EN_B, 0); - hnae_set_bit(egress_port, HCLGE_MAC_EPORT_TYPE_B, 0); hnae_set_field(egress_port, HCLGE_MAC_EPORT_VFID_M, HCLGE_MAC_EPORT_VFID_S, vport->vport_id); - hnae_set_field(egress_port, HCLGE_MAC_EPORT_PFID_M, - HCLGE_MAC_EPORT_PFID_S, 0); req.egress_port = cpu_to_le16(egress_port); -- 1.9.1