rtlwifi: btcoex: Fix if == else warnings in halbtc8723b2ant.c

Fix following coccinelle warning:

./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2952:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2961:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3011:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3020:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3439:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3448:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3339:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3348:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3074:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3083:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3192:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3201:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3267:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3276:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3124:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3133:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2821:2-4: WARNING: possible condition with no effect (if == else)
./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2830:2-4: WARNING: possible condition with no effect (if == else)

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
YueHaibing 2018-08-06 12:54:40 +08:00 committed by Kalle Valo
parent 26b701adc3
commit ad2e6d23bd
1 changed files with 36 additions and 144 deletions

View File

@ -2818,23 +2818,11 @@ static void btc8723b2ant_action_sco(struct btc_coexist *btcoexist)
/* sw mechanism */
if (BTC_WIFI_BW_HT40 == wifi_bw) {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
} else {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
}
}
@ -2949,23 +2937,11 @@ static void btc8723b2ant_action_a2dp(struct btc_coexist *btcoexist)
/* sw mechanism */
btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw);
if (BTC_WIFI_BW_HT40 == wifi_bw) {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
} else {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
}
}
@ -3008,23 +2984,11 @@ static void btc8723b2ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist)
/* sw mechanism */
btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw);
if (BTC_WIFI_BW_HT40 == wifi_bw) {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
} else {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
}
}
@ -3071,23 +3035,11 @@ static void btc8723b2ant_action_pan_edr(struct btc_coexist *btcoexist)
/* sw mechanism */
btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw);
if (BTC_WIFI_BW_HT40 == wifi_bw) {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
} else {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
}
}
@ -3121,23 +3073,11 @@ static void btc8723b2ant_action_pan_hs(struct btc_coexist *btcoexist)
btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw);
if (BTC_WIFI_BW_HT40 == wifi_bw) {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
} else {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
}
}
@ -3189,23 +3129,11 @@ static void btc8723b2ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist)
/* sw mechanism */
if (BTC_WIFI_BW_HT40 == wifi_bw) {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, true, false,
false, false);
} else {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, false, false,
false, false);
}
}
@ -3264,23 +3192,11 @@ static void btc8723b2ant_action_pan_edr_hid(struct btc_coexist *btcoexist)
/* sw mechanism */
if (BTC_WIFI_BW_HT40 == wifi_bw) {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
} else {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
}
}
@ -3336,23 +3252,11 @@ static void btc8723b2ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist)
/* sw mechanism */
if (BTC_WIFI_BW_HT40 == wifi_bw) {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
} else {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
}
}
@ -3436,23 +3340,11 @@ static void btc8723b2ant_action_hid_a2dp(struct btc_coexist *btcoexist)
/* sw mechanism */
if (BTC_WIFI_BW_HT40 == wifi_bw) {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, true, true,
false, false);
} else {
if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
(wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
} else {
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
}
btc8723b2ant_sw_mechanism(btcoexist, false, true,
false, false);
}
}