Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp658276imm; Fri, 29 Jun 2018 04:21:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIGfmafRyyOqA9kZg2Rqt9BWghXbjdJXrWsdbikEbjDsbukV8nEiU/NZnqdGc+3p9Jr/rYN X-Received: by 2002:a65:6290:: with SMTP id f16-v6mr12399540pgv.155.1530271305556; Fri, 29 Jun 2018 04:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530271305; cv=none; d=google.com; s=arc-20160816; b=WFljL0j2jPn4U1Lqlw9sp+fQbVJAT2P55vwxMMMdFJbvQdeCm4XnWwIEoBUOMX+KEq LsP8zhM6h5Azc5xcikeZ5CIiXhMIPpI9md2ee1cqL7zXzr0QkX82CW8JG3QxnmWE6ibo brQV4mdDfvf1NXbLGmMDG42aR5K5PoXOSA4S/6v1Yvxv4EDxs+OBuUK47qSoKJwybOCZ 35hfU4q9+jYuzkKwBhE71CVLc4JHk0CdHH9q1L8yd6GANsniAidaT+w26S5KkwecYePI uKqhXw7Ok4SNI+NzT8/Cuj7uLyhzkN0wmy4bj/6MwsarP6fQqNCoF5SuMVMnWUt4kDpg VlYA== 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=BdrT4shrrHMqtQHk26MxJaCansB6uwDNVgFcgyN/TIAkMcKmUwnyIrpUiUWhrrR4KJ wGCudFuzwAPKFB7fUj386t1CUIuRrYDHzqAjSt8DyfRNzg2m/+va3zlszgucCg7Z3NpB mW8l4aes4zVOm8j0d5G74i9C/4VIt1OlVX9fvL9ThPCtAN/vHZ3PmsbVcJQOyqQ2CEg9 PTcBJSXIQnLm2/1UhTqlThUHdst9FHlmPoJCzxAAg6y5rOkvftoKZj05rKZfNMex8HuP d8HMpzjQzU31yJ7ou5qZrBsVD8TUaNucmaeY8rJOIJBrZGi5zjvMyTxjcpe1qR5sJ992 xwMg== 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 w16-v6si4746869pfj.144.2018.06.29.04.21.30; Fri, 29 Jun 2018 04:21: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 S934618AbeF2Kyv (ORCPT + 99 others); Fri, 29 Jun 2018 06:54:51 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:49214 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932696AbeF2Kyt (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 1ADC29690CF50; 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 02/10] net: hns3: remove useless code in hclge_cmd_send Date: Fri, 29 Jun 2018 19:22:57 +0800 Message-ID: <1530271385-49668-3-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 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