DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Varghese, Vipin" <vipin.varghese@intel.com>,
	"Tahhan, Maryam" <maryam.tahhan@intel.com>,
	"Pattan, Reshma" <reshma.pattan@intel.com>,
	"Mcnamara, John" <john.mcnamara@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 4/4] app/procinfo: remove useless assignment
Date: Wed, 18 Nov 2020 10:46:42 +0000	[thread overview]
Message-ID: <3282f07d-dcf6-4d8b-b8a8-8caf14dbb492@intel.com> (raw)
In-Reply-To: <MWHPR11MB158187E31B8FFB447393573F90E20@MWHPR11MB1581.namprd11.prod.outlook.com>

On 11/17/2020 6:04 PM, Varghese, Vipin wrote:
> Hi Ferruh,
> 
> Thanks for the update
> 
> snipped
>> show_mempool(char *name)  {
>> -uint64_t flags = 0;
>> +uint64_t flags;
>>
> 
> Checking the current code base it makes more sense to move the code inside `if` condition check. Sample code shared below
> 
> ```
> -uint64_t flags = 0;
> 
> snprintf(bdr_str, MAX_STRING_LEN, " show - MEMPOOL ");
> STATS_BDR_STR(10, bdr_str);
> 
> if (name != NULL) {
> struct rte_mempool *ptr = rte_mempool_lookup(name);
> if (ptr != NULL) {
> struct rte_mempool_ops *ops;
> 
> +unsigned int flags = ptr->flags;
> ops = rte_mempool_get_ops(ptr->ops_index);
> ```
> 
> But it is ok
> 

I think both are OK, this is trivial, let me send a quick v2.

  reply	other threads:[~2020-11-18 10:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 17:14 [dpdk-dev] [PATCH 0/4] cppcheck Ferruh Yigit
2020-11-17 17:14 ` [dpdk-dev] [PATCH 1/4] app/procinfo: fix redundant condition Ferruh Yigit
2020-11-17 17:14 ` [dpdk-dev] [PATCH 2/4] app/procinfo: fix negative check on unsigned variable Ferruh Yigit
2020-11-17 17:14 ` [dpdk-dev] [PATCH 3/4] app/procinfo: remove suspicious sizeof Ferruh Yigit
2020-11-17 18:07   ` Varghese, Vipin
2020-11-17 17:14 ` [dpdk-dev] [PATCH 4/4] app/procinfo: remove useless assignment Ferruh Yigit
2020-11-17 18:04   ` Varghese, Vipin
2020-11-18 10:46     ` Ferruh Yigit [this message]
2020-11-18 11:45 ` [dpdk-dev] [PATCH v2 0/7] cppcheck Ferruh Yigit
2020-11-18 11:45   ` [dpdk-dev] [PATCH v2 1/7] app/procinfo: fix redundant condition Ferruh Yigit
2020-11-18 14:10     ` David Marchand
2020-11-19  9:34       ` Ferruh Yigit
2020-11-18 11:45   ` [dpdk-dev] [PATCH v2 2/7] app/procinfo: fix negative check on unsigned variable Ferruh Yigit
2020-11-18 14:10     ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-11-18 11:45   ` [dpdk-dev] [PATCH v2 3/7] app/procinfo: remove suspicious sizeof Ferruh Yigit
2020-11-18 14:10     ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-11-18 11:45   ` [dpdk-dev] [PATCH v2 4/7] app/procinfo: remove useless assignment Ferruh Yigit
2020-11-18 14:11     ` David Marchand
2020-11-18 11:45   ` [dpdk-dev] [PATCH v2 5/7] net/pcap: remove local variable shadown outer one Ferruh Yigit
2020-11-18 14:11     ` David Marchand
2020-11-18 11:45   ` [dpdk-dev] [PATCH v2 6/7] net/af_xdp: remove useless assignment Ferruh Yigit
2020-11-18 14:42     ` David Marchand
2020-11-18 11:45   ` [dpdk-dev] [PATCH v2 7/7] net/bnxt: fix redundant return Ferruh Yigit
2020-11-18 14:42     ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-11-18 16:12       ` Ajit Khaparde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3282f07d-dcf6-4d8b-b8a8-8caf14dbb492@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=maryam.tahhan@intel.com \
    --cc=reshma.pattan@intel.com \
    --cc=stable@dpdk.org \
    --cc=vipin.varghese@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).