Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp49630rwb; Tue, 6 Dec 2022 17:07:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf4cR1ZbOrF4DE9/CcU1c72Xv0KzK+DNTSnatOcVqdWc1y0JeAtXN38tmB14yFYVddXdBQTb X-Received: by 2002:a63:1860:0:b0:478:5c3b:bf57 with SMTP id 32-20020a631860000000b004785c3bbf57mr29459601pgy.358.1670375264953; Tue, 06 Dec 2022 17:07:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670375264; cv=none; d=google.com; s=arc-20160816; b=s/CQIR9JOnti4rFIQxS/HGpMVjudcLJKUxjfET3DifXjDGmt/GMpWmv5dCv0z5D5mD v9Kd65z15IsOfGGcgJ9b2lhkGfvTf9I73DeyBy5Qz05ZZ5pq8jjjaN5pS86v2+gXcm3o deV7SUwp3ojE/Yzbh8nZCJw18HeklXIqhJhZDsAbX1CnXN0iUyXXo00arl+Of+1N/haN mp5kSrTUivNtqlWep2E+y4eJVnba4LCsU4Nt34GDbIBeaeuUrR/cqOWw0a3xZtiVq9km dbTKBl3hfvQTTAgpScRlGtLaw2L2//VnFZQVmjRbcYmMD9nomO+iDe83LEaz830uNVvQ 2z+Q== 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:authenticated-by; bh=pOZ+93VKHynDgA001T4TAw5lMdgBpwf/KcqqbeLsPKI=; b=bPGI9VTuf6dqGBEWFqCd7pyD17tzUENErHnvbaUnwXXIQtjKhlYUODNXQafEJdmcqK Mmsmja1IughtAX9C4JhOXOKyEjxWCUQ3Voy2GZOjqPsiEvouixGpfij8GRb6aJugqmuJ KLIjzQ4ZXKLRlogo+gA61pr3/tJpvlKxJPs9do/4E0kFQ5gOhU2OFnRuP/yNZXPb15tb DpRwHoQdemjJ3+YyFLbvonuulNMhZ2VTX/u6WCjEOpDqykJh9tZ3TVEVDQiOY2YCQExU PZ4ZFZWoV2sXQC7Mt/j92YGOlIX+w0UgR5yXMBF99E0zKn6JagiXbKid+5ijZOs0hX6u 5XWw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f6-20020a170902ce8600b00189274c157bsi15939159plg.518.2022.12.06.17.07.29; Tue, 06 Dec 2022 17:07:44 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbiLGBGb convert rfc822-to-8bit (ORCPT + 66 others); Tue, 6 Dec 2022 20:06:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiLGBGa (ORCPT ); Tue, 6 Dec 2022 20:06:30 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 36F0ADFA5; Tue, 6 Dec 2022 17:06:28 -0800 (PST) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 2B715DEH0016408, 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.81/5.90) with ESMTPS id 2B715DEH0016408 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Wed, 7 Dec 2022 09:05:13 +0800 Received: from RTEXMBS05.realtek.com.tw (172.21.6.98) 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.9; Wed, 7 Dec 2022 09:06:00 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS05.realtek.com.tw (172.21.6.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 7 Dec 2022 09:06:00 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::15b5:fc4b:72f3:424b]) by RTEXMBS04.realtek.com.tw ([fe80::15b5:fc4b:72f3:424b%5]) with mapi id 15.01.2375.007; Wed, 7 Dec 2022 09:06:00 +0800 From: Ping-Ke Shih To: Peter Kosyh CC: Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "lvc-project@linuxtesting.org" Subject: RE: [PATCH] rtlwifi: btcoexist: fix conditions branches that are never executed Thread-Topic: [PATCH] rtlwifi: btcoexist: fix conditions branches that are never executed Thread-Index: AQHZCWBsVE1fupnf1UyGMvz9xEveQ65hmHsA Date: Wed, 7 Dec 2022 01:06:00 +0000 Message-ID: <76613dd5c4154c24bb53efd2551dd33c@realtek.com> References: <20221206104919.739746-1-pkosyh@yandex.ru> In-Reply-To: <20221206104919.739746-1-pkosyh@yandex.ru> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXMBS05.realtek.com.tw, 9 x-kse-attachmentfiltering-interceptor-info: no applicable attachment filtering rules found x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: =?us-ascii?Q?Clean,_bases:_2022/12/6_=3F=3F_10:14:00?= x-kse-bulkmessagesfiltering-scan-result: protection disabled Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 > -----Original Message----- > From: Peter Kosyh > Sent: Tuesday, December 6, 2022 6:49 PM > To: Ping-Ke Shih > Cc: Peter Kosyh ; Kalle Valo ; David S. Miller ; > Eric Dumazet ; Jakub Kicinski ; linux-wireless@vger.kernel.org; > netdev@vger.kernel.org; linux-kernel@vger.kernel.org; lvc-project@linuxtesting.org > Subject: [PATCH] rtlwifi: btcoexist: fix conditions branches that are never executed > > Commit 40ca18823515 ("rtlwifi: btcoex: 23b 1ant: fine tune for wifi not > connected") introduced never executed branches. > > Compile test only. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Peter Kosyh I compare with vendor driver and confirm these changes are correct. Thank you. Acked-by: Ping-Ke Shih > --- > I'm not sure that patch do right thing! But these two places are really > never executed and should be fixed. I hope that Ping-Ka could check this. > > .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c > b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c > index 70492929d7e4..039bbedb41c2 100644 > --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c > +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c > @@ -1903,7 +1903,7 @@ btc8723b1ant_action_wifi_not_conn_scan(struct btc_coexist *btcoexist) > true, 32); > halbtc8723b1ant_coex_table_with_type(btcoexist, > NORMAL_EXEC, 4); > - } else if (bt_link_info->a2dp_exist) { > + } else if (bt_link_info->pan_exist) { > halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, > true, 22); > halbtc8723b1ant_coex_table_with_type(btcoexist, > @@ -1964,8 +1964,7 @@ static void btc8723b1ant_action_wifi_conn_scan(struct btc_coexist *btcoexist) > true, 32); > halbtc8723b1ant_coex_table_with_type(btcoexist, > NORMAL_EXEC, 4); > - } else if (bt_link_info->a2dp_exist && > - bt_link_info->pan_exist) { > + } else if (bt_link_info->pan_exist) { > halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, > true, 22); > halbtc8723b1ant_coex_table_with_type(btcoexist, > -- > 2.38.1