From 1bf156aaf16a0c5a15dea65dfad285ee968aa76b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20G=C3=B6rner?= <5477952+MaxG87@users.noreply.github.com> Date: Tue, 14 May 2024 09:53:16 +0200 Subject: [PATCH] fix: Remove useless if-guard GCC 13 complained about the usage of an enum in a boolean context. On closer investigation it turned out that the value wasn't dynamic and the if-guard always evaluated to true. By removing the guard the compile blocker disappears. --- hal/phydm/halrf/rtl8822b/halrf_iqk_8822b.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/hal/phydm/halrf/rtl8822b/halrf_iqk_8822b.c b/hal/phydm/halrf/rtl8822b/halrf_iqk_8822b.c index c7dae84..0299293 100644 --- a/hal/phydm/halrf/rtl8822b/halrf_iqk_8822b.c +++ b/hal/phydm/halrf/rtl8822b/halrf_iqk_8822b.c @@ -954,18 +954,17 @@ _lok_one_shot_8822b(void *dm_void, u8 path) LOK_notready = _iqk_check_cal_8822b(dm, path, 0x0); _iqk_ltec_write_8822b(dm, 0x38, MASKDWORD, iqk->tmp_gntwl); - if (!LOK_notready) + if (!LOK_notready) { _iqk_backup_iqk_8822b(dm, 0x1, path); - if (DBG_RF_IQK) { - if (!LOK_notready) { - LOK_temp = odm_get_rf_reg(dm, (enum rf_path)path, - RF_0x58, MASK20BITS); - RF_DBG(dm, DBG_RF_IQK, "[IQK]0x58 = 0x%x\n", LOK_temp); - } else { - RF_DBG(dm, DBG_RF_IQK, "[IQK]==>S%d LOK Fail!!!\n", - path); - } - } + } + if (!LOK_notready) { + LOK_temp = odm_get_rf_reg(dm, (enum rf_path)path, + RF_0x58, MASK20BITS); + RF_DBG(dm, DBG_RF_IQK, "[IQK]0x58 = 0x%x\n", LOK_temp); + } else { + RF_DBG(dm, DBG_RF_IQK, "[IQK]==>S%d LOK Fail!!!\n", + path); + } iqk->lok_fail[path] = LOK_notready; return LOK_notready; }