[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250818064111.447765-1-liaoyuanhong@vivo.com>
Date: Mon, 18 Aug 2025 14:41:11 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: Jeff Johnson <jjohnson@...nel.org>,
linux-wireless@...r.kernel.org (open list:QUALCOMM ATHEROS ATH11K WIRELESS DRIVER),
ath11k@...ts.infradead.org (open list:QUALCOMM ATHEROS ATH11K WIRELESS DRIVER),
linux-kernel@...r.kernel.org (open list)
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH] wifi: ath11k: Simplify unnecessary if-else conditions
Some simple if-else logic can be simplified using the ! operator to improve
code readability.
Signed-off-by: Liao Yuanhong <liaoyuanhong@...o.com>
---
drivers/net/wireless/ath/ath11k/mac.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 1fadf5faafb8..328df27116ce 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -7936,10 +7936,8 @@ static void ath11k_mac_parse_tx_pwr_env(struct ath11k *ar,
"no transmit power envelope match client power type %d\n",
client_type);
return;
- } else if (!reg_tpe_count) {
- use_local_tpe = true;
} else {
- use_local_tpe = false;
+ use_local_tpe = !reg_tpe_count;
}
if (use_local_tpe) {
--
2.34.1
Powered by blists - more mailing lists