From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A12DA2EFC for ; Tue, 17 Sep 2019 09:59:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E5111C00F; Tue, 17 Sep 2019 09:58:20 +0200 (CEST) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 2A9981BFBD for ; Tue, 17 Sep 2019 09:58:05 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id v24so2478713ljj.3 for ; Tue, 17 Sep 2019 00:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gApXwU5Mr7lCBBA/zqVS/LfZzY7YW0HpPJUVU04+J/I=; b=Q4eOW8nqokLhafqZCkBBqRmEj0U8PhP1WqxfX9EUR0vx/RalWlfMHB+C2puMZG8Y9z sc4mBSAV49LLPyeGd8eyd+fCB2TvC3Vsxl1rXW9gRUnSKarG/WxoA2kcIam1151PWjBi /guFwXSZ1XD+Gntt03XTiAlcI26jqRBIiPuDToOQXZLiVjDV3x/A5Y/FwGJR8tq983vH BOCmerNZi8MJKPBE3sCr6UCkYXwWdymQKQC7AQUUVX1eV11UyTv4/ef2yWcwdDdeonx4 qtIXv9hc3fWjuBJBCENB6wfNXJH6ICyXpjJcH7A7nKu5HH0nkmc1IBolY3ZNIc/moaeo ZQSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gApXwU5Mr7lCBBA/zqVS/LfZzY7YW0HpPJUVU04+J/I=; b=UG4AIZBn7g7G6BVcQGV6osvm9ePaEJwt6WKere7D4z56LtUkMB3zHd3lpRky/UBDst oAkkcSLP5MY4ul0c/YP4tihQncbAliI/0dTiujN6ewf1ibRVUqQIRsTY8WE22k/ewNrp cj0UqVoO/rLJ4GAUjGgoMh9BUoD38BwzOcqTACK0lSGVNpkNBuhP+VcALGcYeheIksmI Jm+gkAVk0YchxcVcFlo+gPzxoZ/Qfw4tVYt+0YYnE8zN7zOwOFz5HzXkKeuWEVRNOEh8 XARSXqIyloceeV1kNQbusDG9F5FnaZFDtYb/E5P/u7LETSxR7YtDIFkLm6vUIuCnHmpU xzpw== X-Gm-Message-State: APjAAAVpz8cGfIaEUYZt3eZCFZwLa/qVv0ocks6jLApAzugKuCMiEapd Mz/1eYPbvfykHuCpxCwEymZm3xeGJzM12A== X-Google-Smtp-Source: APXvYqzggMRrVMEmmOtPuGFrwNMCdJbhnbUeTOsTAhj2UzoSQMpHgPm1wtAP2NScKyLZKUTk984cEg== X-Received: by 2002:a2e:6e18:: with SMTP id j24mr1082822ljc.158.1568707084650; Tue, 17 Sep 2019 00:58:04 -0700 (PDT) Received: from localhost.localdomain (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.googlemail.com with ESMTPSA id g1sm270659ljl.31.2019.09.17.00.58.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Sep 2019 00:58:04 -0700 (PDT) From: Andrzej Ostruszka To: dev@dpdk.org, Xiao Wang Cc: mattias.ronnblom@ericsson.com, stephen@networkplumber.org, Andrzej Ostruszka Date: Tue, 17 Sep 2019 09:57:53 +0200 Message-Id: <20190917075754.8310-10-amo@semihalf.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190917075754.8310-1-amo@semihalf.com> References: <20190917075754.8310-1-amo@semihalf.com> Subject: [dpdk-dev] [PATCH v2 09/10] net/ifc: fix maybe-uninitialized warnings for LTO build 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" During LTO build compiler reports some 'false positive' warnings about variables being possibly used uninitialized. This patch silences these warnings. Signed-off-by: Andrzej Ostruszka --- drivers/net/ifc/ifcvf_vdpa.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c index 8de9ef199..4cdff8712 100644 --- a/drivers/net/ifc/ifcvf_vdpa.c +++ b/drivers/net/ifc/ifcvf_vdpa.c @@ -304,8 +304,8 @@ vdpa_ifcvf_stop(struct ifcvf_internal *internal) struct ifcvf_hw *hw = &internal->hw; uint32_t i; int vid; - uint64_t features; - uint64_t log_base, log_size; + uint64_t features = 0; + uint64_t log_base = 0, log_size = 0; uint64_t len; vid = internal->vid; @@ -348,6 +348,8 @@ vdpa_enable_vfio_intr(struct ifcvf_internal *internal, bool m_rx) struct rte_vhost_vring vring; int fd; + vring.callfd = -1; + nr_vring = rte_vhost_get_vring_num(internal->vid); irq_set = (struct vfio_irq_set *)irq_set_buf; @@ -442,6 +444,7 @@ notify_relay(void *arg) } internal->epfd = epfd; + vring.kickfd = -1; for (qid = 0; qid < q_num; qid++) { ev.events = EPOLLIN | EPOLLPRI; rte_vhost_get_vhost_vring(internal->vid, qid, &vring); @@ -577,7 +580,7 @@ m_ifcvf_start(struct ifcvf_internal *internal) struct ifcvf_hw *hw = &internal->hw; uint32_t i, nr_vring; int vid, ret; - struct rte_vhost_vring vq; + struct rte_vhost_vring vq = { 0 }; void *vring_buf; uint64_t m_vring_iova = IFCVF_MEDIATED_VRING; uint64_t size; @@ -721,6 +724,7 @@ vring_relay(void *arg) } internal->epfd = epfd; + vring.kickfd = -1; for (qid = 0; qid < q_num; qid++) { ev.events = EPOLLIN | EPOLLPRI; rte_vhost_get_vhost_vring(vid, qid, &vring); @@ -930,11 +934,11 @@ ifcvf_dev_close(int vid) static int ifcvf_set_features(int vid) { - uint64_t features; + uint64_t features = 0; int did; struct internal_list *list; struct ifcvf_internal *internal; - uint64_t log_base, log_size; + uint64_t log_base = 0, log_size = 0; did = rte_vhost_get_vdpa_device_id(vid); list = find_internal_resource_by_did(did); -- 2.17.1