From patchwork Tue Jun 30 00:46:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Krause X-Patchwork-Id: 489672 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 752EF1401AB for ; Tue, 30 Jun 2015 21:45:46 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Sm8iAjW7; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B451791642; Tue, 30 Jun 2015 11:45:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dxRrVwPI3lkQ; Tue, 30 Jun 2015 11:45:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id A659C91634; Tue, 30 Jun 2015 11:45:44 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id E782E1BFA21 for ; Tue, 30 Jun 2015 00:46:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E28E532DE2 for ; Tue, 30 Jun 2015 00:46:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UH0iIWH6sYbc for ; Tue, 30 Jun 2015 00:46:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ig0-f173.google.com (mail-ig0-f173.google.com [209.85.213.173]) by silver.osuosl.org (Postfix) with ESMTPS id 5351432DD5 for ; Tue, 30 Jun 2015 00:46:42 +0000 (UTC) Received: by igblr2 with SMTP id lr2so64442834igb.0 for ; Mon, 29 Jun 2015 17:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Yr2zz5TAj20BoivVManR94VqtMLb5/ozB00veBv4Uio=; b=Sm8iAjW71VXbOKsWC0ULDaABcr+klaFqS6cMkUsL75OiOFbCeojmDlt7g7EBTNhJc6 bWvDhuC6ihf9B6BIWCnuwXBehPvcyeM2nsuffYpHBQK7Bc83KSXBCObhYVMS2Kk1YJ9h Z3vh8rxrL+o2MgnRL0I15lVBs+e5YHR3uNFvIguWvqV0fe1M3orQtBo/Y75t6gQUqf6C BW7dSgArBXiM9jg5EMMtW3THlqYTv5oNobTQ0ZJgUZBjc1abrbBtyTtwGq15PDsRx5w5 bFPP4rzG9SUqRgnBo2tmbLZvwqe7pGSikZKESjidSdXkq6iSVje8JDWRHf68q8jk0nvT U1DA== X-Received: by 10.50.102.7 with SMTP id fk7mr19467396igb.49.1435625201763; Mon, 29 Jun 2015 17:46:41 -0700 (PDT) Received: from nick-System-Product-Name.hitronhub.home (CPEbc4dfb2691f3-CMbc4dfb2691f0.cpe.net.cable.rogers.com. [99.231.110.121]) by mx.google.com with ESMTPSA id l83sm6646655ioi.9.2015.06.29.17.46.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Jun 2015 17:46:40 -0700 (PDT) From: Nicholas Krause To: jeffrey.t.kirsher@intel.com Date: Mon, 29 Jun 2015 20:46:37 -0400 Message-Id: <1435625197-27831-1-git-send-email-xerofoify@gmail.com> X-Mailer: git-send-email 2.1.4 X-Mailman-Approved-At: Tue, 30 Jun 2015 11:45:44 +0000 Cc: linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: [Intel-wired-lan] [PATCH] i40e:Make the function i40e_vsi_clear have a return type of void X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@lists.osuosl.org Sender: "Intel-wired-lan" This makes the function i40e_vsi_clear have a return type of void now due to all freeing functions like this one being guaranteed to not every return a error code to their caller for a non recoverable error in this function and therefore this particular Signed-off-by: Nicholas Krause --- drivers/net/ethernet/intel/i40e/i40e_main.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 48a52b3..c4d44e6 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -5121,8 +5121,6 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags) } } - /* no further action needed, so return now */ - return; } else if (reset_flags & (1 << __I40E_DOWN_REQUESTED)) { int v; @@ -5138,12 +5136,9 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags) } } - /* no further action needed, so return now */ - return; } else { dev_info(&pf->pdev->dev, "bad reset request 0x%08x\n", reset_flags); - return; } } @@ -6211,7 +6206,7 @@ static int i40e_get_capabilities(struct i40e_pf *pf) return 0; } -static int i40e_vsi_clear(struct i40e_vsi *vsi); +static void i40e_vsi_clear(struct i40e_vsi *vsi); /** * i40e_fdir_sb_setup - initialize the Flow Director resources for Sideband @@ -6924,12 +6919,12 @@ static void i40e_vsi_free_arrays(struct i40e_vsi *vsi, bool free_qvectors) * i40e_vsi_clear - Deallocate the VSI provided * @vsi: the VSI being un-configured **/ -static int i40e_vsi_clear(struct i40e_vsi *vsi) +static void i40e_vsi_clear(struct i40e_vsi *vsi) { struct i40e_pf *pf; if (!vsi) - return 0; + return; if (!vsi->back) goto free_vsi; @@ -6966,8 +6961,6 @@ unlock_vsi: mutex_unlock(&pf->switch_mutex); free_vsi: kfree(vsi); - - return 0; } /**