diff mbox series

[2/2] lib/power:fix comparision to bool warning

Message ID tencent_771A412756220DADE84312E71953957F7408@qq.com (mailing list archive)
State New
Headers show
Series None | expand

Checks

Context Check Description
ci/iol-abi-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

biggest dreamer June 13, 2022, 3:56 p.m. UTC
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 mbox series

Patch

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