DPDK patches and discussions
 help / color / mirror / Atom feed
From: 835703180@qq.com
To: david.hunt@intel.com
Cc: dev@dpdk.org, newsky647 <835703180@qq.com>
Subject: [PATCH 2/2] lib/power:fix comparision to bool warning
Date: Mon, 13 Jun 2022 23:56:43 +0800	[thread overview]
Message-ID: <tencent_771A412756220DADE84312E71953957F7408@qq.com> (raw)

From: newsky647 <835703180@qq.com>

expr "if ([expr] == true)" can be simplified to "if ([expr])".
Therefore, simplify it, no functional change.

Fixes: 450f0791312 ("lib/power:  power: add traffic pattern aware power control"
Signed-off-by: newsky647 <835703180@qq.com>
---
 lib/power/rte_power_empty_poll.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/power/rte_power_empty_poll.c b/lib/power/rte_power_empty_poll.c
index 4a4db51247..c58f4155d9 100644
--- a/lib/power/rte_power_empty_poll.c
+++ b/lib/power/rte_power_empty_poll.c
@@ -326,9 +326,9 @@ empty_poll_training(struct priority_worker *poll_stats,
 			max_train_iter);
 
 
-	if (poll_stats->thresh[LOW].trained == true
-			&& poll_stats->thresh[MED].trained == true
-			&& poll_stats->thresh[HGH].trained == true) {
+	if (poll_stats->thresh[LOW].trained
+			&& poll_stats->thresh[MED].trained
+			&& poll_stats->thresh[HGH].trained ) {
 
 		set_state(poll_stats, MED_NORMAL);
 
-- 
2.35.1.windows.2


             reply	other threads:[~2022-06-13 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 15:56 835703180 [this message]
2023-09-12 11:08 ` Stephen Hemminger

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=tencent_771A412756220DADE84312E71953957F7408@qq.com \
    --to=835703180@qq.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    /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).