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 69779A00C4; Sun, 10 May 2020 13:54:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3A0EA1D521; Sun, 10 May 2020 13:54:01 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id E48321D51E for ; Sun, 10 May 2020 13:53:59 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id i19so6492376ioh.12 for ; Sun, 10 May 2020 04:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=C9PGtXbQAGKCKfqM7hGJ/LXg15cFIjOSV/YnCOgdtMA=; b=J8xjvrWcwyifqjxU3pYdHaPDPSL6FxITqoIUlagPt5PEX+Ju2FEYKg2Tt3JjVL3Zo4 WwbhGVNYejc+5uAmaO54Qu5mdTWIYdhFFXiAGZ9TzSH48A4nG476D4dp5Y8I/t1/TFY+ oRq5OkG6Qpl1R/8LduajOBfvCSyMaCYIQ1Wy7wHEAkM8Xd762xBiSZm4J9eKOV0GPTrK MybDIhSSSY3rMx6gbLR0SV514H5OIcHbNer5KiFzJh4YwUFqjHvRFLzPmxn3jkD/+5DP IWv4nhCENhK7lM4w1Fpd7MPbE/8DOYBlTFmVPE9V+dNbKfXaffMAfY8lXpaMa+ixheVc L7jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=C9PGtXbQAGKCKfqM7hGJ/LXg15cFIjOSV/YnCOgdtMA=; b=oe/KsSUHPabM2d6VdWLJR8nMF406XWzc+Iv/WJKcTXsMiXzLoMK0eHMHm+mmDVNRxm iNZONk1GaLJL/sCmWlT/Yx9CdNW3E8OtNc0t1wwzbJ/mf/LTwlyuJSNdnkjgVRna9aYQ AO9JIwuIuUFFAJeFqmsvrayyLnQxhX9x1QIIGoAVre95rF8+GR8a236NaWAAiYHdTh6d 0nq+UTf4FXfZdJIwCiFiBwtbnrQ6TF1PV+T7sIrSKeNIxOvqzLo3KchfnHkO5kMWF4uM 0T3wDLR0wHi+SWGZH+U4Aex6CWT/vgAE1zgThPdIcTrR8TN5Uxo4wGQSeAeXp1oSjCDY PUaA== X-Gm-Message-State: AGi0PubyYBYw8pqvr29J7Hjf0zRZ+W04PkESvZysZ3A1xGICK9zMrcTe Qo+lasP9Ru2lnk4YuNjB25Qw8sYbPYEBzVvJX+JPzJJ1 X-Google-Smtp-Source: APiQypLKGbKRXKOWfhFpUvTfAYHyyDAOi+3idtPnZ+xP8F/gqf90vzlcCTD++qOJi9DRb+xC55r1ajKOU4YIXOY0EvU= X-Received: by 2002:a02:c6c5:: with SMTP id r5mr7457091jan.133.1589111639242; Sun, 10 May 2020 04:53:59 -0700 (PDT) MIME-Version: 1.0 References: <20200507120259.2197813-1-ferruh.yigit@intel.com> <20200508164546.2489396-1-ferruh.yigit@intel.com> <20200508164546.2489396-4-ferruh.yigit@intel.com> In-Reply-To: From: Jerin Jacob Date: Sun, 10 May 2020 17:23:43 +0530 Message-ID: To: "Ananyev, Konstantin" Cc: "Yigit, Ferruh" , Pavan Nikhilesh , Jerin Jacob , "dev@dpdk.org" , Thomas Monjalon , David Marchand Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2 4/4] event/octeontx2: fix build for O1 optimization 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" On Fri, May 8, 2020 at 10:52 PM Ananyev, Konstantin wrote: > > > > > Subject: [PATCH v2 4/4] event/octeontx2: fix build for O1 optimization > > > > Can be reproduced with "make EXTRA_CFLAGS=3D'-O1'" command using > > gcc 7.3.0 > > > > Build error > > In file included from .../drivers/event/octeontx2/ot > > x2_evdev.c:15:0: > > .../drivers/event/octeontx2/otx2_evdev_stats.h: > > In function =E2=80=98otx2_sso_xstats_get=E2=80=99: > > .../drivers/event/octeontx2/otx2_evdev_stats.h:124:9: > > error: =E2=80=98xstats=E2=80=99 may be used uninitialized in this f= unction > > [-Werror=3Dmaybe-uninitialized] > > xstat =3D &xstats[ids[i] - start_offset]; > > ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > This is false positive, 'xstats_mode_count' should be preventing taking > > the loop and accessing 'xstats'. > > Returning in that case to silence the compiler warning. > > > > Reported-by: Konstantin Ananyev > > Signed-off-by: Ferruh Yigit > > --- > > drivers/event/octeontx2/otx2_evdev_stats.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/event/octeontx2/otx2_evdev_stats.h b/drivers/event= /octeontx2/otx2_evdev_stats.h > > index 9d7c694ee6..74fcec8a07 100644 > > --- a/drivers/event/octeontx2/otx2_evdev_stats.h > > +++ b/drivers/event/octeontx2/otx2_evdev_stats.h > > @@ -67,7 +67,7 @@ otx2_sso_xstats_get(const struct rte_eventdev *event_= dev, > > > > switch (mode) { > > case RTE_EVENT_DEV_XSTATS_DEVICE: > > - break; > > + return 0; > > case RTE_EVENT_DEV_XSTATS_PORT: > > if (queue_port_id >=3D (signed int)dev->nb_event_ports) > > goto invalid_value; > > -- > > Tested-by: Konstantin Ananyev > Acked-by: Konstantin Ananyev Acked-by: Jerin Jacob > > > 2.25.4 >