Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1515633ybj; Tue, 5 May 2020 23:23:42 -0700 (PDT) X-Google-Smtp-Source: APiQypJIJ/hRYkjf2ayCTYkE5eKLqkY8Ec8Rq1hZujoYKMC0gLmU78gnu0sbWhkbqErQ41T3QJMa X-Received: by 2002:a17:907:118b:: with SMTP id uz11mr5825419ejb.89.1588746222725; Tue, 05 May 2020 23:23:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588746222; cv=none; d=google.com; s=arc-20160816; b=Zthu98TwaOziBChgCbB04Ea0zL3Qf9KLJvMk3cHXBjEV4OylK56ScNoTxHgzjqk/b1 XmDiRktReFdgt7rZbHbD7bda80XKmhHJl1OuZ8dyeLwufgcWjSyWRd9Xkpt4L/4Fui3N IVoh62cnYaLdArmw+pycXOPYar3iUPiho6DDHHRRQA0a9g8aU73z9WmeydBBOKFF5rYP KXxiK85f5EB7MCr0XwNnf1ea+GOngOUYihclOftOGEtLA8+2draKqLS8ydeiIfQXaE4V WczGWP9wToy/wC2iPSfn2oITvCu/vBKnxS5VK+CHkdiW0e2O9tsl0ilJwDIAS6JkR8b/ vNnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=1wDdGZCZDRALbRwjH3FwZlXpojU/aMVLqV4dQfJ3xIs=; b=C4w725T8c6CyB7UmSMjPN4buKhPn8UMGktA9NIotm4oIso0U1RXOtSZUy/Ut8xPsS1 CU7l6gGk8WmJKaPBNPwZlHX5keYMisbc82+5E3HSxgLyeSsKa2MJjMNbFY9L9MLrMK9E L1YYpYd/2RVZC4KjQN1wJiQdm4bN0feRXhys1VsZLVULQbyzxE+DeKnY6K1Zt7/JHAvs Q+jyHUY40VQ8fwp0uvIvvKYBuJhly4xFvI8goxBy4gwiBWeAsl5J6Y4y0b50+Y9yXyqY S5jnF8YbTvzi5qJiTpzxOKtwCDum/55G2Er3WeREdWfkhAgYb5flstccghNKr1oaTBvq s4bg== 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 z9si454849edi.65.2020.05.05.23.23.19; Tue, 05 May 2020 23:23:42 -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 S1727845AbgEFGTZ (ORCPT + 99 others); Wed, 6 May 2020 02:19:25 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3856 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726863AbgEFGTZ (ORCPT ); Wed, 6 May 2020 02:19:25 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 6348CA83649E26CF3A34; Wed, 6 May 2020 14:19:23 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Wed, 6 May 2020 14:19:13 +0800 From: Jason Yan To: , , , , , CC: Jason Yan Subject: [PATCH net-next] i40e: Make i40e_shutdown_adminq() return void Date: Wed, 6 May 2020 14:18:35 +0800 Message-ID: <20200506061835.19662-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: drivers/net/ethernet/intel/i40e/i40e_adminq.c:699:13-21: Unneeded variable: "ret_code". Return "0" on line 710 Signed-off-by: Jason Yan --- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 6 +----- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c index 37514a75f928..6a089848c857 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c @@ -694,10 +694,8 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw) * i40e_shutdown_adminq - shutdown routine for the Admin Queue * @hw: pointer to the hardware structure **/ -i40e_status i40e_shutdown_adminq(struct i40e_hw *hw) +void i40e_shutdown_adminq(struct i40e_hw *hw) { - i40e_status ret_code = 0; - if (i40e_check_asq_alive(hw)) i40e_aq_queue_shutdown(hw, true); @@ -706,8 +704,6 @@ i40e_status i40e_shutdown_adminq(struct i40e_hw *hw) if (hw->nvm_buff.va) i40e_free_virt_mem(hw, &hw->nvm_buff); - - return ret_code; } /** diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h index bbb478f09093..5c1378641b3b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h +++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h @@ -17,7 +17,7 @@ /* adminq functions */ i40e_status i40e_init_adminq(struct i40e_hw *hw); -i40e_status i40e_shutdown_adminq(struct i40e_hw *hw); +void i40e_shutdown_adminq(struct i40e_hw *hw); void i40e_adminq_init_ring_data(struct i40e_hw *hw); i40e_status i40e_clean_arq_element(struct i40e_hw *hw, struct i40e_arq_event_info *e, -- 2.21.1