From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuval Shaia Subject: Re: [PATCH 3/3] IB/srpt: fix compilation warning Date: Wed, 28 Dec 2016 13:18:27 +0200 Message-ID: <20161228111826.GC4735@yuval-lap> References: <1482922813-8392-1-git-send-email-maxg@mellanox.com> <1482922813-8392-4-git-send-email-maxg@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1482922813-8392-4-git-send-email-maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Max Gurtovoy Cc: bvanassche-HInyCGIudOg@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, israelr-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org List-Id: linux-rdma@vger.kernel.org Reviewed-by: Yuval Shaia On Wed, Dec 28, 2016 at 01:00:13PM +0200, Max Gurtovoy wrote: > warning: 'prev_nents' may be used uninitialized in this function > > Signed-off-by: Max Gurtovoy > --- > 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) { > -- > 1.7.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html