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 4875EA04DD for ; 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 3EDDDC8CC; Wed, 18 Nov 2020 15:11:59 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id D8CECC8CC for ; Wed, 18 Nov 2020 15:11:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605708715; 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=iOdjhNRfr4BOslaoWaUm6OBAw/OV8tZJmxBKM71/diS7G7Idz0J3djwURj8nSEf15kFq7L 3Lf0ZaUEGNGXJmMQfkXeECLzzc5SuN3t8GDU+0dbt0ENnS4kU1LguiB3JrimAP4nvu0zm1 aN6VK/vQQDF/RgzE6wyjkH8e0zJ4snM= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-508-7oDtglK3PCye-kvrFlpRDw-1; Wed, 18 Nov 2020 09:11:53 -0500 X-MC-Unique: 7oDtglK3PCye-kvrFlpRDw-1 Received: by mail-vs1-f70.google.com with SMTP id v8so263713vso.10 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=SBAHiZZ262GQfGALDXgpltS7Am0bWp3FcbMZVm0yfUG/ZJrA9WRdqAllKNsvcZ2Jzr 0Iy1K3Hl8J1gUQQ3jv8g9Aqsbj+7uULiPiTm4Fmo1M093OtJMmQm0BibpbpNWHTocglx EGE+ac/4UD/EsalYg71Vf0bKG3+HNGuDD+lp1JfnWs5mG5+znQhedX30EKoiIKah0GMu 2WUSzQ6XgR5yNKhgwBAVphp+7SD8PJXYM6G0Ry4lPFa/MVjVg0dmWdI6g82vRflmioEN LsiLft5vMLiwoz8QPG5SzYQRkv5vOXNylirGWo+caaqsGAIA6iYQ5ibfB42Y8wQy32HC rVAA== X-Gm-Message-State: AOAM530q3Lp1pDDm3rdEJa5McdftreHb2Ls2bBbG60fD2AwCHllNxQ4k hAozcCBk/MfkwoXYqMe6NKMt2128Lq7DnKdcSyh2znRInQRPsgnrxZnU3zEzrPYBY08xu5xWQjr fml2IVpPCqAmKQ//3P/zq+is= X-Received: by 2002:a05:6102:2362:: with SMTP id o2mr3244097vsa.5.1605708712898; 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-stable] [dpdk-dev] [PATCH v2 4/7] app/procinfo: remove useless assignment X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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