From patchwork Wed Nov 18 11:45:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 84320 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9E755A04E6; Wed, 18 Nov 2020 12:47:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AC5DC90A; Wed, 18 Nov 2020 12:45:49 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 74EA8C90A; Wed, 18 Nov 2020 12:45:46 +0100 (CET) IronPort-SDR: WIZ8XUBMQ7ZScWh2E5CMCcX9eAyHnWqh3TYfVCWZf20iisi84fi+fMLlkriTXNDiLH/nxilWDr QQ13rsmA9pTg== X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="158876070" X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="158876070" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2020 03:45:46 -0800 IronPort-SDR: IDP/v0at4RQ4Jz3WVadvDkji15xlD/qjHiGOME3WzNM8SSIYrisCEom7oSiAAJK/4Z6LPc2pH9 Yv1InGcE1TUA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="476313158" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by orsmga004.jf.intel.com with ESMTP; 18 Nov 2020 03:45:43 -0800 From: Ferruh Yigit To: Maryam Tahhan , Reshma Pattan , Vipin Varghese , John McNamara Cc: Ferruh Yigit , dev@dpdk.org, stable@dpdk.org Date: Wed, 18 Nov 2020 11:45:22 +0000 Message-Id: <20201118114525.99053-5-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201118114525.99053-1-ferruh.yigit@intel.com> References: <20201117171435.2303641-1-ferruh.yigit@intel.com> <20201118114525.99053-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Subject: [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" '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 Reviewed-by: David Marchand --- 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; - flags = ptr->flags; ops = rte_mempool_get_ops(ptr->ops_index); printf(" - Name: %s on socket %d\n" " - flags:\n"