From patchwork Sat Dec 26 18:45:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 7922201 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7FFAF9F387 for ; Sat, 26 Dec 2015 18:45:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7EC1620320 for ; Sat, 26 Dec 2015 18:45:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 84ED520306 for ; Sat, 26 Dec 2015 18:45:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037AbbLZSpj (ORCPT ); Sat, 26 Dec 2015 13:45:39 -0500 Received: from mout.web.de ([212.227.15.3]:51781 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751971AbbLZSpi (ORCPT ); Sat, 26 Dec 2015 13:45:38 -0500 Received: from [192.168.1.2] ([78.53.181.98]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0Lxwjk-1aFysB0LRM-015Gu1; Sat, 26 Dec 2015 19:45:23 +0100 Subject: [PATCH 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> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <567EE040.4020700@users.sourceforge.net> Date: Sat, 26 Dec 2015 19:45:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <567EDED5.4040201@users.sourceforge.net> X-Provags-ID: V03:K0:/vHSlF4oeY2SB5UsS2PMpuUXTaqaWzoiE8oQYTtVT6P317czQd1 zfaRks5AZ43G+SW6Arw2Gc3pA/0Hpb9dU5oX+i3baKjmf47kn9qU7epjo183gXv2FqwsuXO av9OCuQpdWVWx+f4mrjKwjmnoSWMKe0nVfrT7k9gZMwq+ebde3QHHCfjGd0M/gQGLGcjSr+ +bcjEDDWt+HjIrcQo+81w== X-UI-Out-Filterresults: notjunk:1; V01:K0:w7p4tDJed4U=:vgGqqeLMHkP1r3/SuXJYwH eMacN+qyOZ73gmJp2zC6bN3VO3vaLFYiufawSZsLp9mfbJfSNYOdUVoduDZaj7tpMuSyaPrHN JewsOYHs4ASNhJV3Nabj0D20cVree2VwnHK/KA9OEjYOZbcKuhX6zifV5JOZ+KOWT0eJpvCN0 g7cqtmuq5m7FIXyRng6b4iPcNkHEQZpJqVLyeWXLmIN2nZiaXcrxQtIP/a91CrjDVUf1M7v7Q 6qKAAZL9mjOkDk19XYUj6L7SRgdehGZxljjNRUoTYyICsBajG+lXPiK8AHnSXNMQDgWI5Y5T/ fDDeYnmT8/EcIL7UxxkhByu8SFF/q53tYh5X//IUVtikX7LXYIxvDOdwi4E4G2nPv3a07rxeW fw+dMX9DpGjgPm4/NK3zdWlohP+Jjye5hUZemD/Z7sgPejA938YGxqT4MWNtAlZpiMegW0fM7 C23YbtaaXpYcuGRCT8SWtR7iTIKwRYZ334TYMVgxs0DJ1Q2Udu2k2+NXNLoED4nHEvoZhxqwL FQRGFLq5gz76hjKjAFoB9Nk83VM3V6MA6RlDF5gwUOlcPXqpddZMGEcd83A8ePyT7B7v+ew7q A1hzVFnEZAH2+ACf5Yt0cx5f2hOb/YtFPaC3+f4CLdUWWKt4rB76FSPRiCiApF1Pvu0RT0WaX 7tP7SqsrcT/cKKYjyKCgl4aTJ9pg3eZ38FDcjgEgyMG75TBr2mXRxxc9Ek+Nj8GxnHbHnYDJ9 elECAUuPw8ye+WmDS1y/TcTqvhWg6NkDV6/aYkIpf2OStbJiplZl4iUA+NZCrWhe3YR3et0HL GLBOMdP 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=ham 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: Sat, 26 Dec 2015 18:18:18 +0100 The variable "status" will be set to an appropriate value a bit later. Thus let us 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 9820074..98c0abd 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 30f67be..6647aa6 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c @@ -1089,7 +1089,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) >> @@ -2842,7 +2842,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 374c839..aba1b5a 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); @@ -592,7 +592,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); @@ -619,7 +619,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)) @@ -1282,7 +1282,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; @@ -1946,7 +1946,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);