From patchwork Thu Nov 19 11:58:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 84374 X-Patchwork-Delegate: david.marchand@redhat.com 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 2A1D7A04DD; Thu, 19 Nov 2020 13:00:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 85CAAC90A; Thu, 19 Nov 2020 12:59:20 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 811C2C8B6; Thu, 19 Nov 2020 12:59:15 +0100 (CET) IronPort-SDR: rrlxzF/g5HIP61BICj87QX29BhEVIuABTIxxIsQ78JVVCt69QS06Lmj7Wk/7qXImTLmqngvWjN v3ekYw5YhO7w== X-IronPort-AV: E=McAfee;i="6000,8403,9809"; a="170494399" X-IronPort-AV: E=Sophos;i="5.77,490,1596524400"; d="scan'208";a="170494399" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2020 03:59:14 -0800 IronPort-SDR: ZaV+wH0lTsdaFE6UfYi7A4pXuTd9KcIPyXsGZSE+icrzIs+CbeXo0svjSuhe8pc3whGyC7C6jr wTbiAVl0JTUQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,490,1596524400"; d="scan'208";a="341665177" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by orsmga002.jf.intel.com with ESMTP; 19 Nov 2020 03:59:12 -0800 From: Ferruh Yigit To: dev@dpdk.org, Maryam Tahhan , Reshma Pattan , Vipin Varghese , John McNamara Cc: Ferruh Yigit , stable@dpdk.org, David Marchand Date: Thu, 19 Nov 2020 11:58:54 +0000 Message-Id: <20201119115900.4095566-5-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201119115900.4095566-1-ferruh.yigit@intel.com> References: <20200824094021.2323605-1-ferruh.yigit@intel.com> <20201119115900.4095566-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [v21.02 v3 04/10] 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 106b44d6fb..44249dd2cb 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"