Skip to contentSkip to conversation

staging: rtl8723bs: replace ternary operator with if-else block

PATCH New Atin Bainada 1 participant 1 message May 13, 2023 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: rtl8723bs: replace ternary operator with if-else block

replace the ternary operator used for assignment of pHalData->ant_path with an if-else block for better readability

---
Changes since v1:
- replace the ternary operator with if-else block

---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +4 -1
index c3c1b49674d3..1e9e1089032b 100644
@@ -2275,7 +2275,10 @@ void Hal_EfuseParseBTCoexistInfo_8723B(
 			pHalData->EEPROMBluetoothAntNum = tempval & BIT(0);
 			/*  EFUSE_0xC3[6] == 0, S1(Main)-RF_PATH_A; */
 			/*  EFUSE_0xC3[6] == 1, S0(Aux)-RF_PATH_B */
-			pHalData->ant_path = (tempval & BIT(6))? RF_PATH_B : RF_PATH_A;
+			if (tempval & BIT(6))
+				pHalData->ant_path = RF_PATH_B;
+			else
+				pHalData->ant_path = RF_PATH_A;
 		} else {
 			pHalData->EEPROMBluetoothAntNum = Ant_x1;
 			if (pHalData->PackageType == PACKAGE_QFN68)
Signature · 1 line
2.40.0