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 CE1371B807 for ; Tue, 24 Oct 2017 16:03:19 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id w105so11486365wrc.0 for ; Tue, 24 Oct 2017 07:03:19 -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=krmS3jf97ZTnnCO8FwN609SXYz2HWujYPWONHF9TKG0=; b=Fz2Qvv12cbiE38iicW19pz70JVxjEXcHRNWCA1gzIkYe/wRc9gI22gfFbW9NSCskRt 10Y33krRx42+mfbmIjfdUrFWNqkREHY9egU7b+bI54+E02zDF1qaCK1A38a1JDUpZf3Q kshFAoh0lOmkJ67h/iS9EHActRdFi5NG+8giGUdpNPkgA4pMtJj73P1OnUU5GStNdmin iR64jRMdIQAQZ/r7juZO/wo40FcL1Pzce5j+EA2KyhOi20o/t+5POhCyiyE2EnZEx2qr WvYsQF1jW/rwtlnFJDfnUeEv+K7IUnWy/2y+pAKvSh8hr9KIqQzqvnI83rYXSQteHHpb GcOA== 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=krmS3jf97ZTnnCO8FwN609SXYz2HWujYPWONHF9TKG0=; b=JGgsKjrljDFYTUS/BH63wgGme3PuRAD2icGdGC87E/0mt1LN59FskPQw+R7zQX4tpu Ol3iF8Vt80kxzyACUHBaVcmyJZuag0iGsQFysZu/5pktlv4V8YQBg02+5IGULR3Ihd5D KfiiSc88BmDMrYNkTw7FKQePup7KNLfVD1anrPK3irww5XKKelt6zMawu2HK8ze67zLm s4/KN3JBYcI/EwcDgOChROfZQTUruTjEj9xFKxPz1jD63qW7NgsDpCUUGVhq3rFjXs/4 JcHYnE0oyiv1qvkj1JBjAHd9Ac2ZT1xn4l10vBtZPtVLDE8G5kp47vwTg9flJVTiXd4B vNAw== X-Gm-Message-State: AMCzsaVRs/LFwF502JnbcnDfV9K5RSqsMzuK6oIGD3FpqCulrpcXMNMJ loCQi39Ul7OaCd2uiZ2qGUMs X-Google-Smtp-Source: ABhQp+RfEW/BrTmopwaCVU9Pd7vcZZ3bPfNdiW4MFoFLSvCaCFy9nw+fGbu3YIbUmcjZ2bluIwvspg== X-Received: by 10.223.199.205 with SMTP id y13mr15322883wrg.71.1508853799236; Tue, 24 Oct 2017 07:03:19 -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 r2sm409690wmb.38.2017.10.24.07.03.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Oct 2017 07:03:18 -0700 (PDT) Date: Tue, 24 Oct 2017 16:03:15 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Moti Haimovsky Cc: adrien.mazarguil@6wind.com, dev@dpdk.org Message-ID: <20171024140315.hoyzl5pu625lfcgg@laranjeiro-vm> References: <1508848533-180885-1-git-send-email-motih@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1508848533-180885-1-git-send-email-motih@mellanox.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 14:03:19 -0000 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? Regards, -- Nélio Laranjeiro 6WIND