Skip to contentSkip to conversation

iwlwifi: dvm: excessive if in rs_bt_update_lq()

PATCH In review Denis Efremov 2 participants 2 messages Sep 25, 2019 – Sep 30, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi: dvm: excessive if in rs_bt_update_lq()

There is no need to check 'priv->bt_ant_couple_ok' twice in rs_bt_update_lq(). The second check is always true. Thus, the expression can be simplified.

---
 drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/dvm/rs.c +1 -1
index 74229fcb63a9..226165db7dfd 100644
@@ -851,7 +851,7 @@ static void rs_bt_update_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
 		 * Is there a need to switch between
 		 * full concurrency and 3-wire?
 		 */
-		if (priv->bt_ci_compliance && priv->bt_ant_couple_ok)
+		if (priv->bt_ci_compliance)
 			full_concurrent = true;
 		else
 			full_concurrent = false;
Signature · 1 line
2.21.0
#1 lore raw
Quoted 14 lines · Denis Efremov

There is no need to check 'priv->bt_ant_couple_ok' twice in rs_bt_update_lq(). The second check is always true. Thus, the expression can be simplified.

---
 drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/dvm/rs.c +0 -0
index 74229fcb63a9..226165db7dfd 100644

drivers/net/wireless/intel/iwlwifi/dvm/rs.c static void rs_bt_update_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, · line 857

Quoted 8 lines
drivers/net/wireless/intel/iwlwifi/dvm/rs.c +1 -1
@@ -851,7 +851,7 @@ static void rs_bt_update_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
 		 * Is there a need to switch between
 		 * full concurrency and 3-wire?
 		 */
-		if (priv->bt_ci_compliance && priv->bt_ant_couple_ok)
+		if (priv->bt_ci_compliance)
 			full_concurrent = true;
 		else
 			full_concurrent = false;

Thanks, Denis! I have applied this to our internal tree and it will reach the mainline following our usual upstreaming process.

--
Cheers,
Luca.