Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4376885rwb; Mon, 31 Jul 2023 06:08:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlGxsx51Tw69/Pk0OrgYxIo4wz4EhYqOS8AdzM83VX4+wg8uxbsZN2McVkihg6TFRw+TJiMk X-Received: by 2002:a05:6a21:3389:b0:13e:1712:4c01 with SMTP id yy9-20020a056a21338900b0013e17124c01mr1207724pzb.42.1690808917405; Mon, 31 Jul 2023 06:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690808917; cv=none; d=google.com; s=arc-20160816; b=az6aRyTPEQMo81rb1/IvFysF/1MP4rMTYvf710XaNq0I2IpdkHlyu4fkbwf8RAbUAj BVw2oeU7zZiHVpsoycOxboC/PgM9AXstV3C6fTY2CcY3uVsnbrXEzy+1EUcj5l90BDu9 S12LzBjXwYx/xSkHeUXQDiJX31cRWvK9cF0N0vcDACkNKtmvUVwQbT8b8tsdwQMFKnS4 IMT6j92UcW8RVNJZQUuAsdGfCDrYu17u4J/cZgF0QDmeZFnzvj81pCeXfdTN41QAieA6 DAe5z2FqZb0/QWuaeQVQ66jC8idHtAKiQ8+76Mk7mcGXomw1qXrlSEHCqYN3/BTQLg7n 7poQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ZWqFHfNiITtT+pyC7I1ffQZnJEKznW9cU7f5A7SPF14=; fh=FjQi3fCJI3k3l9loR+nTvy6rHZR3ZYuBTzXykcl5EUI=; b=c7yrYNURuTez3yVtx3wMK+4GQNyjOGtMsgaZpIEPHmBAL1P6Zd60Zv9Xt9IhfyKoPM iohee6VsucJjn/CxWNiUI6RmlOTZRz1k4WyFSVsWkjvQmPhY0XsfFgEUwWDGA/v2BLnL odHC1qdpRBkHSKAf6l3BgMDOUl1K5sGi03JXtFHiQuy2mfM8+flb9Zb5X6ueccnO2tfO WoG2QJjTPcETGmsqKsyrQcOaEilkiWkFZAZDRAGTDsg9MpS0DIwWn5w3AAqPMj8pHlpC R8yo68P3hI6Wp1I0mQ904PJusnpj7s+6oUNk91l7LPva2tUvsjhdvEbYMDczGsVyPWLJ NutA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a056a000aca00b0067c03d5624csi7422516pfl.293.2023.07.31.06.08.17; Mon, 31 Jul 2023 06:08:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232908AbjGaMqA (ORCPT + 59 others); Mon, 31 Jul 2023 08:46:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232874AbjGaMpk (ORCPT ); Mon, 31 Jul 2023 08:45:40 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0EB119A1 for ; Mon, 31 Jul 2023 05:45:34 -0700 (PDT) Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RDycJ0C7QzrS2Q; Mon, 31 Jul 2023 20:44:32 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi500008.china.huawei.com (7.221.188.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 31 Jul 2023 20:45:31 +0800 From: Ruan Jinjie To: , , CC: Subject: [PATCH -next] ath9k: Remove unnecessary ternary operators Date: Mon, 31 Jul 2023 20:44:55 +0800 Message-ID: <20230731124455.2039184-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Ther are a little ternary operators, the true or false judgement of which is unnecessary in C language semantics. Signed-off-by: Ruan Jinjie --- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 3 +-- drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index 3caa149b1013..fd5312c2a7e3 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c @@ -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; diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 27ff1ca2631f..e5414435b141 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -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; diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 51766de5ec3b..44e02cfe2438 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -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) -- 2.34.1