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 776E7A04DD; Wed, 18 Nov 2020 15:12:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5DE9EC8FC; Wed, 18 Nov 2020 15:11:59 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 029B9C8DC for ; Wed, 18 Nov 2020 15:11:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605708716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IG+soKVv/KaTi3bEL9Im8xjtST7hFKBsCzk/wZSI9x0=; b=Lws8pMjhe13zxwWvNLjEEIDLVZy76P1gyC7dBVa8FXo80GNdS9gzmM/q5VgAFAODDmLB08 ZOhpBE5cgXPT81VunQobo7Entyq+epSxGDV0G1DI+N/dDqp3uI01+T4fwvbIfYk2CPciei NNYGNP6hNJ/JjxZM8vdlzUDl1VW6Xc4= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-547-6T7_I2YFMImWrHcUg2BtUw-1; Wed, 18 Nov 2020 09:11:55 -0500 X-MC-Unique: 6T7_I2YFMImWrHcUg2BtUw-1 Received: by mail-vs1-f71.google.com with SMTP id s6so263739vsl.5 for ; Wed, 18 Nov 2020 06:11:53 -0800 (PST) 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; bh=IG+soKVv/KaTi3bEL9Im8xjtST7hFKBsCzk/wZSI9x0=; b=lGzji64UahKVTPLkcMsVFodOj7vWhVFJa/i+xdwssZ4t7CfyLDPbnCyqHUIjR57RQc JjGDkIWMGtrh0ff7EsqSVXkIUgAQmnYEq8Q6hF9yaJaCMJ6BwM8rDpiBq9l+VX8wfrTB cABBefg5XYaS89OsRrZ/oSt95gvO00CcGMoFgmoFOpQ6h3mV9ftfWS0mD38GZTebN1dL 1FFb2Kq0VhkI18bGnhdPZolErda+EkvsYMvDggo9aNrj5Eb1e65cBe8rd/vzxVT4sfCR 4JGXVw/evNrmw3Momlq+bwC6+K27VUG4EL4dnSkiBDPt8c3+mG1C5g9FctzsOHAFZdcz pI8A== X-Gm-Message-State: AOAM533O1pkgrIWEkPKAIl39UUNlX2qeP6+MRCenZwFJCiCz3wk3qYif cvs8yk6MJ2/2P6PWB2jbaBEVky2Eu66L0JcS9dAOQENXBh/CsVIPGyC5LqcUCDuW6Uw7w7+A9xh 3RXPXTJ2ULj0xdnL23v0= X-Received: by 2002:a05:6102:2362:: with SMTP id o2mr3244101vsa.5.1605708712902; Wed, 18 Nov 2020 06:11:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2Zm3BBU2G/53WL6cGWl0vrohCUlfchBcK7c9uvSFK1/0Noeda5sRVcjp8S70+Ulj2mqqMEj9tuWXsVWn4lvE= X-Received: by 2002:a05:6102:2362:: with SMTP id o2mr3243820vsa.5.1605708710520; Wed, 18 Nov 2020 06:11:50 -0800 (PST) MIME-Version: 1.0 References: <20201117171435.2303641-1-ferruh.yigit@intel.com> <20201118114525.99053-1-ferruh.yigit@intel.com> <20201118114525.99053-5-ferruh.yigit@intel.com> In-Reply-To: <20201118114525.99053-5-ferruh.yigit@intel.com> From: David Marchand Date: Wed, 18 Nov 2020 15:11:39 +0100 Message-ID: To: Ferruh Yigit Cc: Maryam Tahhan , Reshma Pattan , Vipin Varghese , John McNamara , dev , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 4/7] app/procinfo: remove useless assignment 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 Wed, Nov 18, 2020 at 12:47 PM Ferruh Yigit wrote: > > 'flag' is initialized to '0' but it is overwritten later, moving the > declaration where it is used and initialize with actual value. > > Fixes: 0101a0ec6217 ("app/procinfo: add --show-mempool") > Cc: stable@dpdk.org > > Signed-off-by: Ferruh Yigit > --- > app/proc-info/main.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/app/proc-info/main.c b/app/proc-info/main.c > index dc5cc92209..b891622ccb 100644 > --- a/app/proc-info/main.c > +++ b/app/proc-info/main.c > @@ -1264,8 +1264,6 @@ show_ring(char *name) > static void > show_mempool(char *name) > { > - uint64_t flags = 0; > - > snprintf(bdr_str, MAX_STRING_LEN, " show - MEMPOOL "); > STATS_BDR_STR(10, bdr_str); > > @@ -1273,8 +1271,8 @@ show_mempool(char *name) > struct rte_mempool *ptr = rte_mempool_lookup(name); > if (ptr != NULL) { > struct rte_mempool_ops *ops; > + uint64_t flags = ptr->flags; Do we really need a temp storage? But otherwise, Reviewed-by: David Marchand > > - flags = ptr->flags; > ops = rte_mempool_get_ops(ptr->ops_index); > printf(" - Name: %s on socket %d\n" > " - flags:\n" > -- > 2.26.2 > -- David Marchand