From patchwork Thu Jan 14 17:43:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 8034761 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E1C6BEEE5 for ; Thu, 14 Jan 2016 17:44:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F85F2045A for ; Thu, 14 Jan 2016 17:44:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6924C2049C for ; Thu, 14 Jan 2016 17:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755961AbcANRna (ORCPT ); Thu, 14 Jan 2016 12:43:30 -0500 Received: from mout.web.de ([212.227.15.4]:64485 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753931AbcANRn2 (ORCPT ); Thu, 14 Jan 2016 12:43:28 -0500 Received: from [192.168.1.3] ([77.182.186.104]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0MbQLE-1aaCLn0npc-00Ii1G; Thu, 14 Jan 2016 18:43:15 +0100 Subject: [PATCH v3 2/6] InfiniBand-ocrdma: Delete unnecessary variable initialisations in 11 functions To: linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Hal Rosenstock , Mitesh Ahuja , Sean Hefty , Selvin Xavier References: <566ABCD9.1060404@users.sourceforge.net> <567EDED5.4040201@users.sourceforge.net> <5697D865.5010507@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <5697DE31.9040309@users.sourceforge.net> Date: Thu, 14 Jan 2016 18:43:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <5697D865.5010507@users.sourceforge.net> X-Provags-ID: V03:K0:T43dUOF5DhFJaAVqIY/bB6wK8TmacAaP1zvmCfLwAZqy5T64yJj mK845djYwSD2wOjN8teuQ9tUXP+S9scU653LUm7H9hIBprl5u67vMpNs/Z9lQsBfwDgKaW7 /XA432ou7pzk37y/PCQVcdL0KHF348JSOlaLt+5sW9+I0s4iSxdrqAz0bua31GYb7kpe9AN NR5nzxngEjqTUqEe7suuw== X-UI-Out-Filterresults: notjunk:1; V01:K0:6XYvxgVQcxA=:TuPpGqB0GY1oWng9uy3dkK Q41iL/wvjZ8K/eu/s0CLmy1LguGgPyVASrdb3vZXlaYigZqF08DfyEt24054QCFOUgoixvRbO WsZtQTnZB/TUpMKieObikc3GU8AxdfEdrOP2/qyRxV4HODVp2uwd4mAjUDT9c77ldJ/3ejo4b cPdDp9q9wm6vNrddTC0HpTTu2gDVbkiWwPXI6HVln1e8/DOYumWl2OTUzb3asPYhTNaEzIryO 0vnVJpzGGk5bXiWFfgxTDVUP0CSw3pl1oJ3OOMB7VIKuX49fXxSAszTXnyNOBgl4EOcbUy2In Ez9p2/6PeVKRZr+FTvUcPSQVnZNqpRChJemoAkwT+X5C+k6tGuvBaKHHVQ2Xha7JTIWWSprD6 jfHWT8NpsrFsR8qi6dWJJn05iT57tsSQH3bQHYnLMzgCVidEChvVg3PdJuA7bgohtQcyUfOT4 QU/1S0vJIJNCrSj50x5Pr0sMUY6LIjdV+sVW2j1K2+hFom7CeZfFPMehlMciyGejvsupQo9TR UCO62R6mPayOTyfOb7+kbe1+N2m7fYdJJDTVepmIRzuKw30rvflZe2vdHh4fZ1dz6sSIRdaUu GY8EVNSrai7W4vHwTAZUsaf4M6nTf5Dzq88bL3Gw+iytaWcQ6+9wo0GMGsjQJ12UkJ5Y+JpoY SIOPU2dl4DZX7Qo0/9ieSTCGQfJiHc5Qnjzzfj5MZAhpPgn7gM/iArA7xTEgQj4l9yBuhFspN tkyBEWlxy8DfcrIiilkkEtQRG5g1hDICtsHKzTxFg9nVGDbvkBPS79JplRGXl3v7wrtqdCYai +yVYZHR Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 14 Jan 2016 17:47:59 +0100 The variable "status" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 4 ++-- drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 4 ++-- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c index a343e03..41f0171 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c @@ -59,7 +59,7 @@ static inline int set_av_attr(struct ocrdma_dev *dev, struct ocrdma_ah *ah, struct ib_ah_attr *attr, union ib_gid *sgid, int pdid, bool *isvlan, u16 vlan_tag) { - int status = 0; + int status; struct ocrdma_eth_vlan eth; struct ocrdma_grh grh; int eth_sz; diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 283ca84..159b1d5 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c @@ -1113,7 +1113,7 @@ mbx_err: static int ocrdma_nonemb_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe, void *payload_va) { - int status = 0; + int status; struct ocrdma_mbx_rsp *rsp = payload_va; if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK) >> @@ -2871,7 +2871,7 @@ int ocrdma_mbx_destroy_srq(struct ocrdma_dev *dev, struct ocrdma_srq *srq) static int ocrdma_mbx_get_dcbx_config(struct ocrdma_dev *dev, u32 ptype, struct ocrdma_dcbx_cfg *dcbxcfg) { - int status = 0; + int status; dma_addr_t pa; struct ocrdma_mqe cmd; diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c index 86c303a..119baa3 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c @@ -608,7 +608,7 @@ static char *ocrdma_driver_dbg_stats(struct ocrdma_dev *dev) static void ocrdma_update_stats(struct ocrdma_dev *dev) { ulong now = jiffies, secs; - int status = 0; + int status; struct ocrdma_rdma_stats_resp *rdma_stats = (struct ocrdma_rdma_stats_resp *)dev->stats_mem.va; struct ocrdma_rsrc_stats *rsrc_stats = &rdma_stats->act_rsrc_stats; @@ -639,7 +639,7 @@ static ssize_t ocrdma_dbgfs_ops_write(struct file *filp, { char tmp_str[32]; long reset; - int status = 0; + int status; struct ocrdma_stats *pstats = filp->private_data; struct ocrdma_dev *dev = pstats->dev; diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 4caf167..1d90d18 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -419,7 +419,7 @@ static struct ocrdma_pd *_ocrdma_alloc_pd(struct ocrdma_dev *dev, struct ib_udata *udata) { struct ocrdma_pd *pd = NULL; - int status = 0; + int status; pd = kzalloc(sizeof(*pd), GFP_KERNEL); if (!pd) @@ -468,7 +468,7 @@ static inline int is_ucontext_pd(struct ocrdma_ucontext *uctx, static int _ocrdma_dealloc_pd(struct ocrdma_dev *dev, struct ocrdma_pd *pd) { - int status = 0; + int status; if (dev->pd_mgr->pd_prealloc_valid) status = ocrdma_put_pd_num(dev, pd->id, pd->dpp_enabled); @@ -593,7 +593,7 @@ map_err: int ocrdma_dealloc_ucontext(struct ib_ucontext *ibctx) { - int status = 0; + int status; struct ocrdma_mm *mm, *tmp; struct ocrdma_ucontext *uctx = get_ocrdma_ucontext(ibctx); struct ocrdma_dev *dev = get_ocrdma_dev(ibctx->device); @@ -620,7 +620,7 @@ int ocrdma_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) unsigned long vm_page = vma->vm_pgoff << PAGE_SHIFT; u64 unmapped_db = (u64) dev->nic_info.unmapped_db; unsigned long len = (vma->vm_end - vma->vm_start); - int status = 0; + int status; bool found; if (vma->vm_start & (PAGE_SIZE - 1)) @@ -1283,7 +1283,7 @@ static int ocrdma_copy_qp_uresp(struct ocrdma_qp *qp, struct ib_udata *udata, int dpp_offset, int dpp_credit_lmt, int srq) { - int status = 0; + int status; u64 usr_db; struct ocrdma_create_qp_uresp uresp; struct ocrdma_pd *pd = qp->pd; @@ -1947,7 +1947,7 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq, enum ib_srq_attr_mask srq_attr_mask, struct ib_udata *udata) { - int status = 0; + int status; struct ocrdma_srq *srq; srq = get_ocrdma_srq(ibsrq);