From patchwork Wed Dec 28 11:00:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Gurtovoy X-Patchwork-Id: 9490153 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 B832562AB7 for ; Wed, 28 Dec 2016 11:00:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F5632094D for ; Wed, 28 Dec 2016 11:00:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92BAE2624D; Wed, 28 Dec 2016 11:00:24 +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, UNPARSEABLE_RELAY 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 2A85E2094D for ; Wed, 28 Dec 2016 11:00:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751318AbcL1LAV (ORCPT ); Wed, 28 Dec 2016 06:00:21 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:45991 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751285AbcL1LAV (ORCPT ); Wed, 28 Dec 2016 06:00:21 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from maxg@mellanox.com) with ESMTPS (AES256-SHA encrypted); 28 Dec 2016 13:00:14 +0200 Received: from r-vnc08.mtr.labs.mlnx (r-vnc08.mtr.labs.mlnx [10.208.0.121]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id uBSB0D13004611; Wed, 28 Dec 2016 13:00:14 +0200 From: Max Gurtovoy To: bvanassche@acm.org, linux-rdma@vger.kernel.org Cc: israelr@mellanox.com, Max Gurtovoy Subject: [PATCH 3/3] IB/srpt: fix compilation warning Date: Wed, 28 Dec 2016 13:00:13 +0200 Message-Id: <1482922813-8392-4-git-send-email-maxg@mellanox.com> X-Mailer: git-send-email 1.7.8.2 In-Reply-To: <1482922813-8392-1-git-send-email-maxg@mellanox.com> References: <1482922813-8392-1-git-send-email-maxg@mellanox.com> 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 warning: 'prev_nents' may be used uninitialized in this function Signed-off-by: Max Gurtovoy Reviewed-by: Yuval Shaia --- drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index aa18d74..b36f9a5 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -809,7 +809,7 @@ static int srpt_alloc_rw_ctxs(struct srpt_send_ioctx *ioctx, enum dma_data_direction dir = target_reverse_dma_direction(&ioctx->cmd); struct srpt_rdma_ch *ch = ioctx->ch; struct scatterlist *prev = NULL; - unsigned prev_nents; + unsigned prev_nents = 0; int ret, i; if (nbufs == 1) {