Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fef3c76 authored by Ivan Safonov's avatar Ivan Safonov Committed by Kalle Valo
Browse files

ath9k: Remove unnecessary ?: operator



"(thermometer < 0) ? 0 : (thermometer == X)" is equivalent to
"thermometer == X" for X >= 0.

Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
[Updated commit message]
Signed-off-by: default avatarJulian Calaby <julian.calaby@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent d9f5725f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -4097,16 +4097,16 @@ static void ar9003_hw_thermometer_apply(struct ath_hw *ah)
		REG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4,
			      AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR, therm_on);

	therm_on = (thermometer < 0) ? 0 : (thermometer == 0);
	therm_on = thermometer == 0;
	REG_RMW_FIELD(ah, AR_PHY_65NM_CH0_RXTX4,
		      AR_PHY_65NM_CH0_RXTX4_THERM_ON, therm_on);
	if (pCap->chip_chainmask & BIT(1)) {
		therm_on = (thermometer < 0) ? 0 : (thermometer == 1);
		therm_on = thermometer == 1;
		REG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4,
			      AR_PHY_65NM_CH0_RXTX4_THERM_ON, therm_on);
	}
	if (pCap->chip_chainmask & BIT(2)) {
		therm_on = (thermometer < 0) ? 0 : (thermometer == 2);
		therm_on = thermometer == 2;
		REG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4,
			      AR_PHY_65NM_CH0_RXTX4_THERM_ON, therm_on);
	}