From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 2C6B41B815 for ; Tue, 24 Oct 2017 16:35:18 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id r196so3854827wmf.2 for ; Tue, 24 Oct 2017 07:35: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; bh=7dyJpZJnH4r/jxVMt85YnB9zIJx/6q+iWYMehZxZUMY=; b=M3n/zATIrdgPfCZKIQUzFw6hFInQY1ngNmji7BLHFxgmKr0RDwMUy6K7D3b8Y8ckJN N/+b8s0E1z7d1LKzjq7r58R8IoDZ1lKvpnzlCpDsU5VriHL0q/pEsHaLPnbMPWCP9GmQ a7cjOeW4P18MjeNFDZzbbBJexGUWYqowXtbIfOkvu2dd3fgL7w1ObLDakYBLcpG3qcKk r/2sV7MkzUNW4fCe06UUSYIw8ipIusPZsQ2OLdM8WZjr2kjc2gEmd11sMQL/vwyuBaxx 1Tk88XUlRCnU/zvw/T2d0LXgGf0bUupKQR2AmyXuH20s5sGvkTokiWS1EU/6PYtkWeMq icaw== 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; bh=7dyJpZJnH4r/jxVMt85YnB9zIJx/6q+iWYMehZxZUMY=; b=SaYE9OoLs3RgumEHWZxeyyFHqWKgx/didMgKSen2sd6WGZHrbikaiEd/+RDuODTRIu 96venQnntI3Rk6duR5ZRm4nooX33qfm/AokzPpozZ5pECzcXwTzGeNHeXxb565+jOmFh GIr9FeU1vxRU5zYvVUCfKwbuOTpWvOIXqRHZubOWrQ3+3WusNEwhMDBJXlxiUO0CoScc 2dsbywR2Cdj8RrG1Ezq8o7c0vKAawZUMJuxt81XHv5b8BLAAZ6fTSmZ/ncOLiTUkTLO/ s2uzwQjO2E2iNPKyZXvh3i+WvpTWUHNZIu4poB2cBgQHeWWCmI0/QQsRf9s//Cq2cD6O b+3w== X-Gm-Message-State: AMCzsaWHER8fPjIU6qIW8JAhrs2AJfsXJ6OAvNkGFccN5VPwGAaM8Of3 4N+IcHqgPpemasKjGAEQqj72NA== X-Google-Smtp-Source: ABhQp+RXxIUzCOGmiDrToMehzoNsU2oyCbp96TSypU/VfR1ckUy38F6DtREtFkYFxBBQKhQkIdQlrw== X-Received: by 10.28.69.210 with SMTP id l79mr8505540wmi.117.1508855717785; Tue, 24 Oct 2017 07:35:17 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 61sm468275wrg.58.2017.10.24.07.35.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2017 07:35:16 -0700 (PDT) Date: Tue, 24 Oct 2017 16:35:05 +0200 From: Adrien Mazarguil To: =?utf-8?B?TsOpbGlv?= Laranjeiro Cc: Moti Haimovsky , dev@dpdk.org Message-ID: <20171024143505.GB26782@6wind.com> References: <1508848533-180885-1-git-send-email-motih@mellanox.com> <20171024140315.hoyzl5pu625lfcgg@laranjeiro-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171024140315.hoyzl5pu625lfcgg@laranjeiro-vm> 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:35:18 -0000 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. Patch is OK for me as is: Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND