wifi: ath9k: Remove unnecessary ternary operators
Ther are a little ternary operators, the true or false judgement of which is unnecessary in C language semantics. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230731124455.2039184-1-ruanjinjie@huawei.com
This commit is contained in:
@@ -572,8 +572,7 @@ static void ath9k_hw_set_ar9287_power_per_rate_table(struct ath_hw *ah,
|
||||
}
|
||||
|
||||
for (ctlMode = 0; ctlMode < numCtlModes; ctlMode++) {
|
||||
bool isHt40CtlMode =
|
||||
(pCtlMode[ctlMode] == CTL_2GHT40) ? true : false;
|
||||
bool isHt40CtlMode = pCtlMode[ctlMode] == CTL_2GHT40;
|
||||
|
||||
if (isHt40CtlMode)
|
||||
freq = centers.synth_center;
|
||||
|
||||
@@ -1432,7 +1432,7 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
|
||||
{
|
||||
struct usb_device *udev = interface_to_usbdev(interface);
|
||||
struct hif_device_usb *hif_dev = usb_get_intfdata(interface);
|
||||
bool unplugged = (udev->state == USB_STATE_NOTATTACHED) ? true : false;
|
||||
bool unplugged = udev->state == USB_STATE_NOTATTACHED;
|
||||
|
||||
if (!hif_dev)
|
||||
return;
|
||||
|
||||
@@ -719,7 +719,7 @@ static int ath9k_htc_tx_aggr_oper(struct ath9k_htc_priv *priv,
|
||||
|
||||
aggr.sta_index = ista->index;
|
||||
aggr.tidno = tid & 0xf;
|
||||
aggr.aggr_enable = (action == IEEE80211_AMPDU_TX_START) ? true : false;
|
||||
aggr.aggr_enable = action == IEEE80211_AMPDU_TX_START;
|
||||
|
||||
WMI_CMD_BUF(WMI_TX_AGGR_ENABLE_CMDID, &aggr);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user