From patchwork Sun Apr 24 07:55:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Zhengkui X-Patchwork-Id: 567099 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DFF9C433FE for ; Sun, 24 Apr 2022 07:56:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236637AbiDXH7e (ORCPT ); Sun, 24 Apr 2022 03:59:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbiDXH7c (ORCPT ); Sun, 24 Apr 2022 03:59:32 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2091.outbound.protection.outlook.com [40.107.117.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 417D1541A6; Sun, 24 Apr 2022 00:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OVGyh9Y7XsBjkQCLV08YuFjAXNPqbYDtVYvYyX75rz25loN6OtVQ3BMkeyCRvFC+xpE7Maynb27HwG+cB0+SSiyWP+jkzAS8XeMw62OQM20rnQ6QWmtSJknhg0VCmvdku1KYQD8Rpr0CG/9V7UdvpykXWUxDbDGzdY6wyzTEBFHdVDCVLWdMDt+53KNErJPxbW4RzHosCeskcRuIAR/Yxo5rC5ugGhpMCMh7vKI9yyO4FiOjWOBa+hYxF+9HRPS93PQ082SEMttTRwwlUssUysBjTdD7ESHh0TpxcVFn/UOq8gT7J1ku6fCBu9U2RoYR2Ketak3CQPm3MeW920PgiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Nv8HDgP6Yo/iVSvn4myTnf66fmYLevVkUlk257lf4v0=; b=mGqri7i03i+91yeyvumMAVZAPyWaCor27i36hRVRmDtD1X1WLdKnVSdd0HK373lxImKvznNviYT5+IhzWQKZJuczq+gEN0cm5Ce2+7Dc42NdssS6F6fiKRssyC262+ZRg4k0Uj+sB5W8l6Z+6J/S79ccu8WVrXiCsYo+rARANACy3pmKkLDAcd503uycMJEu/YF68jlXDiLQG+JWjCy6WQpDafh3+5UQcjo7lN2hUej4XUJStSnzDIGyXHrmhuXAcXlslJUOKWBtTGf8fAy4RzAffxaqFSSUAIo4d295tXEm1D83dTrINIbSVYraGJS01jCxJj4/y5FFHK0PHpy0WA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Nv8HDgP6Yo/iVSvn4myTnf66fmYLevVkUlk257lf4v0=; b=VwTTMSUOlBoHVwTCmryhDqJemwfQNDPCW4/FwZTvCS7wnoXn4oQjYeJkN+OKJB9WKRH1P4gL3Zx+wrSbdwrO+fvbMkxPucy3lSZ07IQV7VePJq88hR3MxGtxk3hWKG+TWo94lPl/stQycqsZb0pZzQ5QfBXRvoCiARvXoI0LAPY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from HK2PR06MB3492.apcprd06.prod.outlook.com (2603:1096:202:2f::10) by SI2PR06MB4347.apcprd06.prod.outlook.com (2603:1096:4:15b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Sun, 24 Apr 2022 07:56:25 +0000 Received: from HK2PR06MB3492.apcprd06.prod.outlook.com ([fe80::88e1:dc04:6851:ad08]) by HK2PR06MB3492.apcprd06.prod.outlook.com ([fe80::88e1:dc04:6851:ad08%7]) with mapi id 15.20.5186.020; Sun, 24 Apr 2022 07:56:25 +0000 From: Guo Zhengkui To: Ping-Ke Shih , Kalle Valo , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Guo Zhengkui , linux-wireless@vger.kernel.org (open list:REALTEK WIRELESS DRIVER (rtlwifi family)), netdev@vger.kernel.org (open list:NETWORKING DRIVERS), linux-kernel@vger.kernel.org (open list) Cc: zhengkui_guo@outlook.com Subject: [PATCH] rtlwifi: btcoex: fix if == else warning Date: Sun, 24 Apr 2022 15:55:45 +0800 Message-Id: <20220424075548.1544-1-guozhengkui@vivo.com> X-Mailer: git-send-email 2.20.1 X-ClientProxiedBy: SG2PR01CA0138.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::18) To HK2PR06MB3492.apcprd06.prod.outlook.com (2603:1096:202:2f::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f64a9c5c-4ee0-4725-747a-08da25c7ee72 X-MS-TrafficTypeDiagnostic: SI2PR06MB4347:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hSnLbRg72tiRwwdSrqGdcvEuQJdCfc71vRWSTGXacN63qZ3ndGW6N6SgGw5y5vkE4ggUhBjXVYWoviHb1KSkW2gIhLHqRJ9fl+Z/awV20+8GjCy/svVZgniAPhLuheE8l0aIcfWKdD0k5QQUa67JwK7ljnyhGpZFbh7W7qbFwoWqMRg5VFvDbnMnmmTjGRjkcXuZ3xGERxZKnyWkCfGCHxrjYL/w0nJE2bRTNI2W5ST8tf63NYh55LW6eFd0ED6avH/wWn6GK6MAZk5r/+DfGKH4lF4jYv5FpdMjRWgxOQEp67ffuptnwn6MEywRC5XuWrrqXLtl2rIfQKZ8pdZhZmYIYrDBqMgcivLQbXD9JpjsWWql2SlvtRQV5bgOg94yUhbouFWvpUtx2XGR08klykPFarFybkxGh22bA+MWQ6iqO8lnTg7PtClvbBN/uLBNIZ3m6u2n/+wxFVmvMf2z6qfqLhWhg2fPIEyYiJmZMWfAfzN6D91DP4STtT/Dsiu4o/CSLQU7fgG8E6is22VicEBQyXXZlPyOoE7SZwWORH98R/v0Zob3EpGR5pxwehbs7G1Aequ0lYXq2mb/e5YVbrgvDLkxsXtOYjKP10UIXMYoQ+aV/GksczpBHF0n6WUC3YZIb0ZU2wJs5vgeXwL37oSTf0sxWQPvQLUgzUxuzyAj7j4eANH3Nh06cYx9kLVR2P6+RED0QWu0zSRNrJQmCQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HK2PR06MB3492.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(83380400001)(316002)(110136005)(2906002)(2616005)(66574015)(1076003)(6486002)(6666004)(5660300002)(52116002)(38100700002)(38350700002)(186003)(26005)(508600001)(8936002)(6506007)(6512007)(86362001)(36756003)(66556008)(66946007)(66476007)(8676002)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FfoYWKynT0O16N5ksVq0qPciVreqzDWMUDyyRjEqVqRWB1GzD1ksjxIHyhjuQgQYbgoG0W3SD0y0K5jVu1Jq69JkPVOjmEqjkLTY20/LwuEWqTpYOpZOFTZRQiOkQ/QvQKRrgG9wedxRPYwmWub77JPFld/HqtjruSNrAGt+51xPvg8tzIhLgOSicJUvo2cJy7kgppwA9YNe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7XxLtrYctNzpGk9awMirpDewEZ9oYmx7odJiue8+IKq82UZMfhTX+bS8d6/5GTW5uIa5z+srP7IKVNysw35CgPjB7QKfHMwRk8Lz6gxTA8anqb3b4a0PC19LswqOMudC7tv9pRWuUA4E08Z/ee7n2F2uA3Ln9upr4zIxpm4dnn++fu909aG9Tmj46FG+WRpKZqc4Ylz1DvXi9RVz3VEgCJrx9kDMBsQmiqkpRFpghB9n8uJZblFggZmNsfTY86asA7day+RfgjNIvxVYS7tiZb46iq3uuujvfMLNpyJiEc0eN9AjmJG2x0k2bOB6WD2P6Pc3czvpjYhlmRjeNvkSUQ33ebu9RKY8No1GPu/qbjIf3IeNEp6UjX2kIfiEwQ3e6y+2bIWrzDYDd9WBBfM6Ax70EdMz/NzaCBKp4bYHuNX3BICHN7h74gUnQffhUVQr5zs3xej0LapbV1PGbEg== X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f64a9c5c-4ee0-4725-747a-08da25c7ee72 X-MS-Exchange-CrossTenant-AuthSource: HK2PR06MB3492.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2022 07:56:25.6638 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZCYIocPYHKjPFoJ/y1vqxT9tIQg2987HwDtrxO2QoKHZxYBIf+V/eyLVRgEagOFYLV1CUe0P0VSox59+BPOoBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4347 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix the following coccicheck warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:1604:2-4: WARNING: possible condition with no effect (if == else). Signed-off-by: Guo Zhengkui --- .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c index a18dffc8753a..2f4c6a37a2e8 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c @@ -1601,17 +1601,10 @@ static void btc8821a1ant_act_wifi_con_bt_acl_busy(struct btc_coexist *btcoexist, } } else if (bt_link_info->hid_exist && bt_link_info->a2dp_exist) { /* HID+A2DP */ - if ((bt_rssi_state == BTC_RSSI_STATE_HIGH) || - (bt_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) { - btc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, - true, 14); - coex_dm->auto_tdma_adjust = false; - } else { - /*for low BT RSSI*/ - btc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, - true, 14); - coex_dm->auto_tdma_adjust = false; - } + /* for low BT RSSI */ + btc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, + true, 14); + coex_dm->auto_tdma_adjust = false; btc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); } else if ((bt_link_info->pan_only) ||