Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3611728imm; Mon, 2 Jul 2018 02:14:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKQfq+SRpb3qW8hPnnUKNJut0IcztO6Z0UuJay7xNtSkSkBAN04EoHdcCb1iR52a3dGUcL5 X-Received: by 2002:a63:ba43:: with SMTP id l3-v6mr20407621pgu.295.1530522885690; Mon, 02 Jul 2018 02:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530522885; cv=none; d=google.com; s=arc-20160816; b=rSVvnG0I7jEAZhbiTRLkr8J6fzeX0O3Nvq0AvedqO4g1viDoZRc9Kcsxm6tx3unUCE KBrKSZP/xbGrfTKVLB3K4BEBgJVL+SEpFTIBC55z4YzuTeYYDRiEcK6Xy/9uqqAbIbv9 258g8cx9Ah6RXVurUxw3vpPrj/XNczyceWX0QGKBrulVz3H1+sbD2k+Wi1mUiAsDomKE +RqqEDmUCbGx4wxXgMOFWajC7Xo0Rt9U3EQ3NGFufSkNnaIx7Pa5/ay+GKcX68s5bHmx e8V93+l2uDBtI0L6iI26D19DYSo0hXy9zP3mIOWyk2fMLyKsKJ38nokr0d/tIo/imsuy UWSQ== 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=0TNZ9wpCq4/Zqvdp6DeaOYN70j8m6F6FBW6RJGZuyoo=; b=GxWmXXfE2xU6Wis2frMIe0YBgooyZqJjGTnkWn7rPvP2KEU8g7+rNmfTH4tKPg6iuz E2yWn/KAeQCBmPesWvRvYLFpokeXyUAVozBeZskY2wsvjm65cSUSahKrfJg+7MSJD3To 7E0Fsq8bUiwNhBvz//Xjse3du4Y2wvwckXzzbCDbiLITn63OxiMx/N6PKMpQhOYIxLoK XDbgdxITmwKwtYX4s1Bq1U49xKSELMrTSVNY70UhXNRw5wUhk4yXKoskMqZMVt0d4UAB pYummtK6uRkc6VkL+7B6LQB9yvwELTlcUAqGChQbUQd7TVkzpTaJ5sx4hj818NBcpg5j 98hg== 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 b17-v6si15466304pls.467.2018.07.02.02.14.31; Mon, 02 Jul 2018 02:14:45 -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 S1753808AbeGBHV6 (ORCPT + 99 others); Mon, 2 Jul 2018 03:21:58 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9143 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751420AbeGBHTM (ORCPT ); Mon, 2 Jul 2018 03:19:12 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3CF7690FBA4FF; Mon, 2 Jul 2018 15:18:57 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.382.0; Mon, 2 Jul 2018 15:18:49 +0800 From: Peng Li To: CC: , , , , , Subject: [PATCH V2 net-next 2/9] net: hns3: remove useless code in hclge_cmd_send Date: Mon, 2 Jul 2018 15:50:19 +0800 Message-ID: <1530517826-69226-3-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530517826-69226-1-git-send-email-lipeng321@huawei.com> References: <1530517826-69226-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 There are some useless type cast, print in hclge_cmd_send. This patch removes them. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c index 6a9576b..969966c 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c @@ -269,19 +269,17 @@ int hclge_cmd_send(struct hclge_hw *hw, struct hclge_desc *desc, int num) /* Get the result of hardware write back */ desc_to_use = &hw->cmq.csq.desc[ntc]; desc[handle] = *desc_to_use; - pr_debug("Get cmd desc:\n"); if (likely(!hclge_is_special_opcode(opcode))) desc_ret = le16_to_cpu(desc[handle].retval); else desc_ret = le16_to_cpu(desc[0].retval); - if ((enum hclge_cmd_return_status)desc_ret == - HCLGE_CMD_EXEC_SUCCESS) + if (desc_ret == HCLGE_CMD_EXEC_SUCCESS) retval = 0; else retval = -EIO; - hw->cmq.last_status = (enum hclge_cmd_status)desc_ret; + hw->cmq.last_status = desc_ret; ntc++; handle++; if (ntc == hw->cmq.csq.desc_num) -- 1.9.1