DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	David Marchand <david.marchand@redhat.com>,
	dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] log: add API to check if a logtype can log in a given level
Date: Tue, 3 Mar 2020 16:15:41 +0000	[thread overview]
Message-ID: <491a3b40-5638-5488-6dd4-a8e8977847ce@intel.com> (raw)
In-Reply-To: <20200303080203.4c6f2ae1@hermes.lan>

On 3/3/2020 4:02 PM, Stephen Hemminger wrote:
> On Tue,  3 Mar 2020 13:25:12 +0000
> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
>>  
>> +int
>> +rte_log_can_log(uint32_t logtype, uint32_t level)
>> +{
>> +	int log_level;
>> +
>> +	if (level > rte_log_get_global_level())
>> +		return 0;
>> +
>> +	log_level = rte_log_get_level(logtype);
>> +	if (log_level < 0)
>> +		return 0;
>> +
>> +	if (level > (uint32_t)log_level)
>> +		return 0;
>> +
>> +	return 1;
>> +}
> 
> Why not use a boolean (stdbool) for return value?
> 

No specific reason, but agree functions suits the bool, I will send a v2.

  reply	other threads:[~2020-03-03 16:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 13:25 Ferruh Yigit
2020-03-03 16:02 ` Stephen Hemminger
2020-03-03 16:15   ` Ferruh Yigit [this message]
2020-03-03 18:18 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2020-03-04  7:50   ` Hyong Youb Kim (hyonkim)
2020-03-04  8:41   ` Hemant Agrawal (OSS)
2020-03-12 13:41   ` David Marchand
2020-03-12 14:52     ` Ferruh Yigit
2020-03-13 14:51   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2020-03-26 14:04     ` Andrzej Ostruszka
2020-03-27 10:23     ` David Marchand

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=491a3b40-5638-5488-6dd4-a8e8977847ce@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).