From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 8FB8D1B805 for ; Tue, 24 Oct 2017 17:21:18 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id y9so8847531wrb.2 for ; Tue, 24 Oct 2017 08:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=EhpG/uPH1cYcunpGJ8XQqhU5bsnqO0Fmf0tIh+C1XZ8=; b=CxqppcIuC7nHCwmq57EfNM0JkciO+lGaig2rGI43TllPLLgsdNINtN5ZN8we/Wxcp9 vFJ3s/LgzlMRVrieqqIi7kTloyvLSSZpJ9anr58ys9UxLbXDuKsMMhCDl8U0YSF/nJAY nC5ak5FnOAnb16whetk2nUriV/SiBubqTv19I28qOiT9cnnfiuNQHxAUzyOvxA1Eh2uC yqzhqlvCM9n/6hiumMCmE34+DkHi69ESXxlb8mWlPUzA0+KoumfYm6MYyGDETVvGVNUQ WIFO/sQShfG5swJH96YqCB1n8iy288vXmnKBDM1zSPHhEdSK5g9uxJv72mHFQQ3fozR7 f4Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=EhpG/uPH1cYcunpGJ8XQqhU5bsnqO0Fmf0tIh+C1XZ8=; b=VUJcpeNUuDjxi5gfnkUcrw8N+KWBsVbR9mJhQ9odUiZbUqJB3MVJ7LwgL47MQqvjH7 vPl/19JzjbuJpSQOif9mz5V0DI/efJZ0mPabn2tHPLP4LX+T9SfukEQZSCYBIXyH28BT DDwcWwh7clMdS5zC0u2e5hZjObt+ic9W4j4UCVt2G7pNXLLSw7aYP7oZT8aAomkoTAXr W0jqSbuMO7YZMbR8UNiE9DMPUdL6QW+COMr6n2NfOtf+3KS/Apez1u0udlviRdmuf6TW qNiomGwZE71UCnQyOphBZseW6rGZHxNWalz6ENNVrLnxi7yDCjD25Xy2g8S6/kQrluNl IOAQ== X-Gm-Message-State: AMCzsaVlK0avvdL2zpQfS7xqrnKHNEKZ+WhW/l643I4fL+anX6X/Va/g Z6mJLXa45ciu3GyQOMV6gnoa X-Google-Smtp-Source: ABhQp+R+gC93cWY7fHGWnhZw14XhL17TGvCUvLnVa1bSV0Y7zcQh1LfAFRQ/nljgoXq/8g9mTynaPg== X-Received: by 10.223.178.26 with SMTP id u26mr15270837wra.239.1508858478349; Tue, 24 Oct 2017 08:21:18 -0700 (PDT) Received: from laranjeiro-vm (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id n138sm620602wmd.3.2017.10.24.08.21.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Oct 2017 08:21:17 -0700 (PDT) Date: Tue, 24 Oct 2017 17:21:14 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Adrien Mazarguil Cc: Moti Haimovsky , dev@dpdk.org Message-ID: <20171024152114.d2zfclazcu4cb27e@laranjeiro-vm> References: <1508848533-180885-1-git-send-email-motih@mellanox.com> <20171024140315.hoyzl5pu625lfcgg@laranjeiro-vm> <20171024143505.GB26782@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171024143505.GB26782@6wind.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v1] net/mlx4: fix missing initializers for old GCC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Oct 2017 15:21:18 -0000 On Tue, Oct 24, 2017 at 04:35:05PM +0200, Adrien Mazarguil wrote: > Hi Nelio, > > On Tue, Oct 24, 2017 at 04:03:15PM +0200, Nélio Laranjeiro wrote: > > Hi Moti, > > > > On Tue, Oct 24, 2017 at 03:35:33PM +0300, Moti Haimovsky wrote: > > > This patch works around compilation issues seen on RHEL 7.2 > > > using GCC 4.8.5: > > > > > > [...] In function 'mlx4_rss_init': > > > [...]/mlx4_rxq.c:433:19: error: 'wq_num' may be used uninitialized > > > in this function [-Werror=maybe-uninitialized] > > > > > > Fixes: ff3397e90080 ("net/mlx4: relax Rx queue configuration order") > > > > > > Signed-off-by: Moti Haimovsky > > > --- > > > drivers/net/mlx4/mlx4_rxq.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c > > > index fb28290..4c50077 100644 > > > --- a/drivers/net/mlx4/mlx4_rxq.c > > > +++ b/drivers/net/mlx4/mlx4_rxq.c > > > @@ -417,6 +417,8 @@ void mlx4_rss_detach(struct mlx4_rss *rss) > > > if (wq) { > > > wq_num = wq->wq_num; > > > claim_zero(ibv_destroy_wq(wq)); > > > + } else { > > > + wq_num = 0; /* Shut up GCC 4.8 warnings. */ > > > } > > > claim_zero(ibv_destroy_cq(cq)); > > > if (!wq) { > > > > Why not initialising the wq_num at 0 directly instead of adding this > > else branch? > > Actually that was my suggestion, it is done to highlight the code path > where buggy GCC versions choke on what they mistake for an uninitialized > variable. Initializing this variable earlier could possibly hide bugs > otherwise. I'll agree with this also. > > Patch is OK for me as is: > > Acked-by: Adrien Mazarguil > > -- > Adrien Mazarguil > 6WIND -- Nélio Laranjeiro 6WIND