Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1653551rdb; Mon, 2 Oct 2023 17:23:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNYsNKdgrRR2DZpp43+LYcLrhmlY247b2VIwbf1R8r/mtkLrmFyyjC94Zi50NCJuDvwiHS X-Received: by 2002:a17:902:f806:b0:1c7:443d:7419 with SMTP id ix6-20020a170902f80600b001c7443d7419mr9200298plb.29.1696292591268; Mon, 02 Oct 2023 17:23:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696292591; cv=none; d=google.com; s=arc-20160816; b=xAx1OrV2z22IHdPobKqtrqRsDfN6sDjoqHGkGfxpSfoKLLM+qwrh4hyvPBLs468Kss oNE6JylEWU2szqn8yczryjO6Jm8a5xOqkQf6UrqRTQAaLkrlTjfsTsQHI8yZQuIWg9se stmUqtjXcehm1iis7nMRcFHV7Bivsq4PLtbY8R1CtpvWD/rLcV8Z9P3MOV3A9LPHhkZK TQPMBBQMjHBtIlcaRZ7od0ScgD88A+WVPOlwy949HO5rxUTJpFAaqosLpbf6TIgoQcXQ PqOmjDNcBlinWLK8nFzjHRPH5uRV+SdLXYc//+41TK3oyloURzVQ5tI6Cy6pByzJ44Ac cxIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=pxeYPJiddQ7FiYZ/jgZ9rBOPZ7F7rbIR2M+tvOpFg7w=; fh=2hI485HFlXJy+4lLjgPX5/GYVcxclaS/2eVblZtiuKQ=; b=PIak3hnzPLe9qRL2XkyNEX2k2H8UkQFHvGJZBiwPHkdfkEFB/qe9iQ8PYybErk8mZD OmqqJmcAFSRlWb15YDCqbpBadUn4KGoqDduU4TiUcbF7t1ei1RL0yL5nFPjptLi6peuh fzlXraCy1mzuD9+YbblsxHrlxbiw9gc3/l6ZTk1Tdy2BNuj2eMIybQ/YqzD7Gkny3Ekg 5hk4ojh9M/CSghU6WbwDTRo8O1H92nC2wTCc4OXU4E6rVIhiI0SiANbJ/hykb4IJJnEQ vQizCNwcQr93L0RbvQDKbS5XkUg/OlFh+OtqNrkfG4Be2lMw/SSlP3bdHIAVvr3ey8nA KWZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id lh4-20020a170903290400b001c470e70cf7si127043plb.273.2023.10.02.17.23.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 17:23:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 88701802688E; Mon, 2 Oct 2023 17:23:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238046AbjJCAXI convert rfc822-to-8bit (ORCPT + 53 others); Mon, 2 Oct 2023 20:23:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238205AbjJCAXH (ORCPT ); Mon, 2 Oct 2023 20:23:07 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CF52D7 for ; Mon, 2 Oct 2023 17:22:59 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3930Mg9L21230567, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.92/5.92) with ESMTPS id 3930Mg9L21230567 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Oct 2023 08:22:42 +0800 Received: from RTEXMBS02.realtek.com.tw (172.21.6.95) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Tue, 3 Oct 2023 08:22:43 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS02.realtek.com.tw (172.21.6.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Tue, 3 Oct 2023 08:22:42 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7]) by RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7%5]) with mapi id 15.01.2375.007; Tue, 3 Oct 2023 08:22:42 +0800 From: Ping-Ke Shih To: Dmitry Antipov CC: Kalle Valo , "linux-wireless@vger.kernel.org" , "lvc-project@linuxtesting.org" Subject: RE: [PATCH] wifi: rtlwifi: remove unreachable code in rtl92d_dm_check_edca_turbo() Thread-Topic: [PATCH] wifi: rtlwifi: remove unreachable code in rtl92d_dm_check_edca_turbo() Thread-Index: AQHZ8rVTtTSwq0cjjEmg6oiYu7UkE7A3OXgw Date: Tue, 3 Oct 2023 00:22:42 +0000 Message-ID: References: <20230929091229.13129-1-dmantipov@yandex.ru> In-Reply-To: <20230929091229.13129-1-dmantipov@yandex.ru> Accept-Language: en-US, zh-TW Content-Language: zh-TW x-originating-ip: [172.21.69.25] x-kse-serverinfo: RTEXMBS02.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 17:23:07 -0700 (PDT) > -----Original Message----- > From: Dmitry Antipov > Sent: Friday, September 29, 2023 5:12 PM > To: Ping-Ke Shih > Cc: Kalle Valo ; linux-wireless@vger.kernel.org; lvc-project@linuxtesting.org; Dmitry > Antipov > Subject: [PATCH] wifi: rtlwifi: remove unreachable code in rtl92d_dm_check_edca_turbo() > > Since '!(0x5ea42b & 0xffff0000)' is always zero, remove unreachable s/zero/false/ > block in 'rtl92d_dm_check_edca_turbo()' and convert EDCA limits to > constant variables. Compile tested only. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Dmitry Antipov > --- > .../wireless/realtek/rtlwifi/rtl8192de/dm.c | 18 ++---------------- > 1 file changed, 2 insertions(+), 16 deletions(-) > > diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c > b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c > index 6cc9c7649eda..87798d7f5407 100644 > --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c > +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c > @@ -596,28 +596,14 @@ static void rtl92d_dm_check_edca_turbo(struct ieee80211_hw *hw) > static u64 last_rxok_cnt; > u64 cur_txok_cnt; > u64 cur_rxok_cnt; > - u32 edca_be_ul = 0x5ea42b; > - u32 edca_be_dl = 0x5ea42b; > + const u32 edca_be_ul = 0x5ea42b; > + const u32 edca_be_dl = 0x5ea42b; move upward to have reverse X'mas tree order. > > if (mac->link_state != MAC80211_LINKED) { > rtlpriv->dm.current_turbo_edca = false; > goto exit; > } > > - /* Enable BEQ TxOP limit configuration in wireless G-mode. */ > - /* To check whether we shall force turn on TXOP configuration. */ > - if ((!rtlpriv->dm.disable_framebursting) && > - (rtlpriv->sec.pairwise_enc_algorithm == WEP40_ENCRYPTION || > - rtlpriv->sec.pairwise_enc_algorithm == WEP104_ENCRYPTION || > - rtlpriv->sec.pairwise_enc_algorithm == TKIP_ENCRYPTION)) { > - /* Force TxOP limit to 0x005e for UL. */ > - if (!(edca_be_ul & 0xffff0000)) > - edca_be_ul |= 0x005e0000; > - /* Force TxOP limit to 0x005e for DL. */ > - if (!(edca_be_dl & 0xffff0000)) > - edca_be_dl |= 0x005e0000; > - } > - > if ((!rtlpriv->dm.is_any_nonbepkts) && > (!rtlpriv->dm.disable_framebursting)) { > cur_txok_cnt = rtlpriv->stats.txbytesunicast - last_txok_cnt; > -- > 2.41.0