From patchwork Thu Nov 10 03:42:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henry Orosco X-Patchwork-Id: 9420587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 21FC460512 for ; Thu, 10 Nov 2016 03:42:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 140F32897F for ; Thu, 10 Nov 2016 03:42:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07FAA28986; Thu, 10 Nov 2016 03:42:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 971F02897F for ; Thu, 10 Nov 2016 03:42:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752870AbcKJDmb (ORCPT ); Wed, 9 Nov 2016 22:42:31 -0500 Received: from mga02.intel.com ([134.134.136.20]:29982 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752563AbcKJDmb (ORCPT ); Wed, 9 Nov 2016 22:42:31 -0500 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 09 Nov 2016 19:42:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,616,1473145200"; d="scan'208";a="189731876" Received: from horosco-mobl2.amr.corp.intel.com ([10.254.112.45]) by fmsmga004.fm.intel.com with ESMTP; 09 Nov 2016 19:42:29 -0800 From: Henry Orosco To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, e1000-rdma@lists.sourceforge.net, Henry Orosco Subject: [PATCH] i40iw: Remove check on return from device_init_pestat() Date: Wed, 9 Nov 2016 21:42:26 -0600 Message-Id: <20161110034226.21248-1-henry.orosco@intel.com> X-Mailer: git-send-email 2.8.3 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove unnecessary check for return code from device_init_pestat() and change func to void. Signed-off-by: Shiraz Saleem Signed-off-by: Henry Orosco --- drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 10 ++-------- drivers/infiniband/hw/i40iw/i40iw_p.h | 2 +- drivers/infiniband/hw/i40iw/i40iw_virtchnl.c | 6 +----- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c index 57a4236..9a5f4b8 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c +++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c @@ -4709,10 +4709,9 @@ static void i40iw_hw_stat_refresh_all(struct i40iw_dev_pestat *devstat) * i40iw_device_init_pestat - Initialize the pestat structure * @dev: pestat struct */ -enum i40iw_status_code i40iw_device_init_pestat(struct i40iw_dev_pestat *devstat) +void i40iw_device_init_pestat(struct i40iw_dev_pestat *devstat) { devstat->ops = iw_device_pestat_ops; - return 0; } /** @@ -4736,12 +4735,7 @@ enum i40iw_status_code i40iw_device_init(struct i40iw_sc_dev *dev, dev->debug_mask = info->debug_mask; - ret_code = i40iw_device_init_pestat(&dev->dev_pestat); - if (ret_code) { - i40iw_debug(dev, I40IW_DEBUG_DEV, - "%s: i40iw_device_init_pestat failed\n", __func__); - return ret_code; - } + i40iw_device_init_pestat(&dev->dev_pestat); dev->hmc_fn_id = info->hmc_fn_id; dev->qs_handle = info->qs_handle; dev->exception_lan_queue = info->exception_lan_queue; diff --git a/drivers/infiniband/hw/i40iw/i40iw_p.h b/drivers/infiniband/hw/i40iw/i40iw_p.h index a0b8ca1..8a59c74 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_p.h +++ b/drivers/infiniband/hw/i40iw/i40iw_p.h @@ -47,7 +47,7 @@ void i40iw_debug_buf(struct i40iw_sc_dev *dev, enum i40iw_debug_flag mask, enum i40iw_status_code i40iw_device_init(struct i40iw_sc_dev *dev, struct i40iw_device_init_info *info); -enum i40iw_status_code i40iw_device_init_pestat(struct i40iw_dev_pestat *); +void i40iw_device_init_pestat(struct i40iw_dev_pestat *devstat); void i40iw_sc_cqp_post_sq(struct i40iw_sc_cqp *cqp); diff --git a/drivers/infiniband/hw/i40iw/i40iw_virtchnl.c b/drivers/infiniband/hw/i40iw/i40iw_virtchnl.c index 3041003..dbd39c4 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_virtchnl.c +++ b/drivers/infiniband/hw/i40iw/i40iw_virtchnl.c @@ -496,11 +496,7 @@ enum i40iw_status_code i40iw_vchnl_recv_pf(struct i40iw_sc_dev *dev, i40iw_debug(dev, I40IW_DEBUG_VIRT, "VF%u error CQP HMC Function operation.\n", vf_id); - ret_code = i40iw_device_init_pestat(&vf_dev->dev_pestat); - if (ret_code) - i40iw_debug(dev, I40IW_DEBUG_VIRT, - "VF%u - i40iw_device_init_pestat failed\n", - vf_id); + i40iw_device_init_pestat(&vf_dev->dev_pestat); vf_dev->dev_pestat.ops.iw_hw_stat_init(&vf_dev->dev_pestat, (u8)vf_dev->pmf_index, dev->hw, false);