Received: by 10.223.185.111 with SMTP id b44csp1005295wrg; Fri, 9 Mar 2018 19:00:13 -0800 (PST) X-Google-Smtp-Source: AG47ELvbik2j89+7al9KNqYyDqC0TOPAHQJPvcz2wCzoZzKQ6zJBeCF+dn11Y2XXmuTQv5/qm2GY X-Received: by 10.99.171.10 with SMTP id p10mr581860pgf.176.1520650813094; Fri, 09 Mar 2018 19:00:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520650813; cv=none; d=google.com; s=arc-20160816; b=bhjZWg2VvCLCfd797TeNHrqvPtn31/aUytpEuvDWDqGSPQskxaxA7VzQeMg2557hex bRZ4bzanhqFjqr8iFocZ1Lo4nGXH5Fo/hn80yhQOtR4L0d4dW84x6+G6xrgmMzn52/CY 4jTUtoP3ts4XA6qYv2e+tnOVIEkN95U5RXW0GwV1yJhGLkZFNnLb2b0boATayWuyBf+5 dbZc49WQe93y6fBXEqxCjP2JLM22ois4q5C4+8c12onMwN1tCiA69a4VCFb6iMI04ggy r3LppyE08aDMUcKAZ39DIl47T+EG/y8juk6Q+TpN8Xz5k+QmECEhiCb3Za3SXzJLiwTA Ny3w== 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=u9ij9CP3hWUBAP0H2DG0wosTn6Iy2sAe2J7N9hAnHSI=; b=KFHiYfIJZbwlAwiIxM+AW/F3sxYFP12o4hkFapb7qWgOHgALQilMAbE8y7VlBe5FwM ectM6S26Kq7zxIs6V2UHiqVENJmcJZvJnDEWA9GTA1X6mbVMteavvJLACI8FJ+C1XaKG UGVPxX0eo0MjO3AwmpIKL7UOKvJ9w1HUylBZHS7kzRKS9MhfEH+ZIZqz7t/7H9aFCleN vTrnJ3i8p+5PLWwj6xv/BVSCRx/nzk1gLuxrm0Ksu78C/yJtibKiN/ZDQYM8+l9pKyVg GKySx7btusQcW0YoHkXmHgRpQcGuZ8nGV3DVo9paacROZZZ9FVtCLv2x+qBVgQUHQsQh nM1g== 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 x80si1965494pfe.393.2018.03.09.18.59.58; Fri, 09 Mar 2018 19:00:13 -0800 (PST) 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 S933007AbeCJC6g (ORCPT + 99 others); Fri, 9 Mar 2018 21:58:36 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:6223 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751878AbeCJC5j (ORCPT ); Fri, 9 Mar 2018 21:57:39 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 6B7F9B9DF65FB; Sat, 10 Mar 2018 10:57:26 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.361.1; Sat, 10 Mar 2018 10:57:17 +0800 From: Peng Li To: CC: , , , , Subject: [PATCH net-next 09/12] net: hns3: fix error type definition of return value Date: Sat, 10 Mar 2018 11:29:30 +0800 Message-ID: <1520652573-75644-10-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520652573-75644-1-git-send-email-lipeng321@huawei.com> References: <1520652573-75644-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: Jian Shen An enum type variable was used to store an "int" type return value. This patch fixes it. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index ea33cc5..ba84281 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -4107,8 +4107,8 @@ int hclge_add_uc_addr_common(struct hclge_vport *vport, { struct hclge_dev *hdev = vport->back; struct hclge_mac_vlan_tbl_entry_cmd req; - enum hclge_cmd_status status; u16 egress_port = 0; + int ret; /* mac addr check */ if (is_zero_ether_addr(addr) || @@ -4140,9 +4140,9 @@ int hclge_add_uc_addr_common(struct hclge_vport *vport, hclge_prepare_mac_addr(&req, addr); - status = hclge_add_mac_vlan_tbl(vport, &req, NULL); + ret = hclge_add_mac_vlan_tbl(vport, &req, NULL); - return status; + return ret; } static int hclge_rm_uc_addr(struct hnae3_handle *handle, @@ -4158,7 +4158,7 @@ int hclge_rm_uc_addr_common(struct hclge_vport *vport, { struct hclge_dev *hdev = vport->back; struct hclge_mac_vlan_tbl_entry_cmd req; - enum hclge_cmd_status status; + int ret; /* mac addr check */ if (is_zero_ether_addr(addr) || @@ -4174,9 +4174,9 @@ int hclge_rm_uc_addr_common(struct hclge_vport *vport, 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); hclge_prepare_mac_addr(&req, addr); - status = hclge_remove_mac_vlan_tbl(vport, &req); + ret = hclge_remove_mac_vlan_tbl(vport, &req); - return status; + return ret; } static int hclge_add_mc_addr(struct hnae3_handle *handle, -- 2.9.3