DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 2/2] lib/power:fix comparision to bool warning
@ 2022-06-13 15:56 835703180
  2023-09-12 11:08 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: 835703180 @ 2022-06-13 15:56 UTC (permalink / raw)
  To: david.hunt; +Cc: dev, newsky647

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-12 11:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13 15:56 [PATCH 2/2] lib/power:fix comparision to bool warning 835703180
2023-09-12 11:08 ` Stephen Hemminger

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).