Message ID | 61d140e53a590054c5981788ed12fdda9ef4c0bb.1458262312.git.julian.calaby@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Kalle Valo |
Headers | show |
> From: Ivan Safonov <insafonov@gmail.com> > > "(thermometer < 0) ? 0 : (thermometer == X)" is equivalent to > "thermometer == X" for X >= 0. > > Signed-off-by: Ivan Safonov <insafonov@gmail.com> > [Updated commit message] > Signed-off-by: Julian Calaby <julian.calaby@gmail.com> Thanks, 16 patches applied to wireless-drivers-next.git: 0fef3c768037 ath9k: Remove unnecessary ?: operator ea544aab42db ipw2x00: use to_pci_dev() 61383412f00d wlcore: use to_delayed_work() d1162f0283f0 wl1251: use to_delayed_work() 4679f4132201 rtlwifi: use to_delayed_work() cfbfbd13695c ath9k_htc: Delete unnecessary variable initialisation 9e12904a953c brcmfmac: Delete unnecessary variable initialisation fb9693f04544 iwlegacy: Return directly if allocation fails in il_eeprom_init() fe9b47944edf iwl4965: Fix a null pointer dereference in il_tx_queue_free and il_cmd_queue_free 96838d61102a b43: Fix memory leaks in b43_bus_dev_ssb_init and b43_bus_dev_bcma_init 1c76b4902c26 rtl818x_pci: Disable pci device in error handling code 8b28310efe24 rsi: Delete unnecessary variable initialisation ab2ef1d68f62 rsi: Delete unnecessary variable initialisation 37190b269491 rsi: Move variable initialisation into error code c2fd34469d16 iwl4965: Fix a memory leak in error handling code of __il4965_up 84d17a2a5a0f iwl4965: Fix more memory leaks in __il4965_up() Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 54ed2f7..a049f8d 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c @@ -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); }