Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7233901rwb; Tue, 6 Dec 2022 03:07:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Vjasbxomf/TTp1Q8NmyD6in24fvtuddZbiptHaWtZkVfiDv7rEvBBUOgEso3tGARJtQwW X-Received: by 2002:a17:907:a072:b0:7c0:ff74:facc with SMTP id ia18-20020a170907a07200b007c0ff74faccmr4826949ejc.515.1670324858058; Tue, 06 Dec 2022 03:07:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670324858; cv=none; d=google.com; s=arc-20160816; b=U9IWhHmcsaR8vtWLvS/iUrsbZt2jCkoIyNWMRtNL5Ri3Ij+WVKyJXA7H7c8cWwd3bG jeITtO+NvaCYuwW6m9g5oOEibznLM3xyu4AtqWDcmwacXvXWSTYZ1U7woAKuk0WPzXqu 4aTjayeJN2+IXP/5ZUp4VY2snjkAxyvliGSNugVXFDL0lTFexbwcv3UMPHxtng1qclnP mHDN8iGLsssqygXBee4CRyUIQO8Inpf/OhIFUoNds2zOBwOCGuej1gG3u+4CUDrmz7bd yN5i0FIVV7Fo3nAYhpLLVsPBHFV4KqvOGOpznqAa8TaZIrB5jCu/PzMqGmaxO7CeDi7w PAAA== 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:dkim-signature; bh=nX5rRc1fYE1rUYGX4czhmXiyglfPlnnMYmPDIfaYWsI=; b=Ysbo2DBcS7YaJZtj3Sfn9uOS0yqc5xZH/FEl0vEAJBOKxC0QHn1AS4oVjf0ChY28U+ EAjRx16mQx8nSfZBTxXWwLVKilZZdl+pj6m6U5vEsCOwT+kXqIDNaUfpMwBXzM/EeLL1 nPrKULoNMbza9JmKazmJYy90O4VRmrOKm0Bjj7BOrwP9WUo4pFlQBJcOv73htxSKrKAh KU4wPgx7p7uLSa3tskJNokTaSRTNEMiw6qLGQ3PtwUistHbWTWaH3dW5v0vaiDkUQnIe 2i2FdSY3QHONBR0kZA7ZIuAJqLiCqF5csQu/OU8PJPmdUciI3dJA9xFcsHRQvAv54yf0 scJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=WK3fA+FO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r21-20020a056402019500b004699e89601dsi1532574edv.588.2022.12.06.03.07.20; Tue, 06 Dec 2022 03:07:38 -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; dkim=pass header.i=@yandex.ru header.s=mail header.b=WK3fA+FO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234444AbiLFK4b (ORCPT + 66 others); Tue, 6 Dec 2022 05:56:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234417AbiLFK43 (ORCPT ); Tue, 6 Dec 2022 05:56:29 -0500 X-Greylist: delayed 421 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 06 Dec 2022 02:56:28 PST Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A1DE38AC for ; Tue, 6 Dec 2022 02:56:28 -0800 (PST) Received: from iva8-7349aab11ef6.qloud-c.yandex.net (iva8-7349aab11ef6.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:77a0:0:640:7349:aab1]) by forward101p.mail.yandex.net (Yandex) with ESMTP id DC8CF59CDB63; Tue, 6 Dec 2022 13:49:25 +0300 (MSK) Received: by iva8-7349aab11ef6.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id KnUKKV0YX8c1-DP2ttQIo; Tue, 06 Dec 2022 13:49:25 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1670323765; bh=nX5rRc1fYE1rUYGX4czhmXiyglfPlnnMYmPDIfaYWsI=; h=Message-Id:Date:Cc:Subject:To:From; b=WK3fA+FOCJEB15gwNSdsUK768K+sa5yZwNsulpHDlfd6eYEXrHzrXuFgePewB+z88 mpsTm+QFta0iO1D0DehajL1WZ/SHFa6yjbuQvN2F+hJ8nMV8ERC5ipJlSVuJM24474 s16qeLQ1SYkWydmYRmD6tVp9Exx2qMS3RX+9oeDQ= Authentication-Results: iva8-7349aab11ef6.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru From: Peter Kosyh 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 Date: Tue, 6 Dec 2022 13:49:19 +0300 Message-Id: <20221206104919.739746-1-pkosyh@yandex.ru> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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'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