Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2385891pxj; Mon, 10 May 2021 01:25:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHI7pnl0wL+d15X8ySqOV2zHAMGcRr/COSFLfG1f7kXcrm6kDBkRsVh/sUyufvNhoPAaXz X-Received: by 2002:a05:6e02:194b:: with SMTP id x11mr21409313ilu.213.1620635124028; Mon, 10 May 2021 01:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620635124; cv=none; d=google.com; s=arc-20160816; b=qCV30g6azQgLevOo8WBlz4gsjWYuORkeVvbp+OOwweHTnixBE3GfNX7VznZ1YI8V4k 4X9vtg6uviuQEbhTywfIlvDP9l4yl39At5edNZUP6yGSgI9hf9is01WTYo1Bi3Pwo5pe nRodMB4E8d+PJSRuFG0+fdCXgjrU97FRs7d8Mo8Vpsi04bEKEKeKhBUrvm6lDa1+h/vR UVUA03JDMmtPOFCmR2rSvqS21N/LfCIWxoARJqwD5QALt5lwI+B8gLRCIVP1wh24MUmp 8pCn2vxDUvbJ5rQjxfPQPxCmn10ME8d6qT6OamXAmODf/MNWOax40OrfRDvwzZTD58g4 eUFQ== 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=lbhjDhpfbQA3BEqyFFA51SmKT4XlSG3qSa/e+KIaLTU=; b=jp4IvnzUPPWUJ8nXIgN6W/g0LXZ2OBkWFMn+4OSQuX2MIM5oYLvEFbQWgrae+tDE1A eoZAsCBnysbtS+wUbjAyhlhXAWDF6mz83kVtyl7xC8D+XEZHGzCEcl8IcJz1tOlBVj0s LEmrni4kYpELORw3jtjyO7hj1QlJl7Fv+NfYHu3yWI14ZEa2mwS+ux6+0stwtwylYkep PtGV9cKRanMFh9gzv+WS+xupsy0Lic4ZvgtXVHjkNyeYiOGhcydoSlk5V8M6QrOROT8X znoC4yAr/vNmcBgAKPoyJ2a41dmwWDJ6uvvYEEVS1rJSaHWpkW96tSizDcZTm091qpZL tRcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si8725830iom.23.2021.05.10.01.25.08; Mon, 10 May 2021 01:25:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230209AbhEJIYu (ORCPT + 99 others); Mon, 10 May 2021 04:24:50 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2606 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230103AbhEJIYt (ORCPT ); Mon, 10 May 2021 04:24:49 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FdvBG6VfDzQlZj; Mon, 10 May 2021 16:20:22 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Mon, 10 May 2021 16:23:36 +0800 From: Zhen Lei To: Ping-Ke Shih , Kalle Valo , "David S . Miller" , Jakub Kicinski , linux-wireless , netdev CC: Zhen Lei Subject: [PATCH 1/1] rtlwifi: btcoex: 21a 2ant: Delete several duplicate condition branch codes Date: Mon, 10 May 2021 16:22:37 +0800 Message-ID: <20210510082237.3315-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The statements of the "if (max_interval == 3)" branch are the same as those of the "else" branch. Delete them to simplify the code. No functional change. Signed-off-by: Zhen Lei --- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c index 447caa4aad325bf..0990b4e84b2538f 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c @@ -1721,10 +1721,6 @@ static void btc8821a2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); coex_dm->ps_tdma_du_adj_type = 14; - } else if (max_interval == 3) { - btc8821a2ant_ps_tdma(btcoexist, - NORMAL_EXEC, true, 15); - coex_dm->ps_tdma_du_adj_type = 15; } else { btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 15); @@ -1739,10 +1735,6 @@ static void btc8821a2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); coex_dm->ps_tdma_du_adj_type = 10; - } else if (max_interval == 3) { - btc8821a2ant_ps_tdma(btcoexist, - NORMAL_EXEC, true, 11); - coex_dm->ps_tdma_du_adj_type = 11; } else { btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 11); @@ -1759,10 +1751,6 @@ static void btc8821a2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 6); coex_dm->ps_tdma_du_adj_type = 6; - } else if (max_interval == 3) { - btc8821a2ant_ps_tdma(btcoexist, - NORMAL_EXEC, true, 7); - coex_dm->ps_tdma_du_adj_type = 7; } else { btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 7); @@ -1777,10 +1765,6 @@ static void btc8821a2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 2); coex_dm->ps_tdma_du_adj_type = 2; - } else if (max_interval == 3) { - btc8821a2ant_ps_tdma(btcoexist, - NORMAL_EXEC, true, 3); - coex_dm->ps_tdma_du_adj_type = 3; } else { btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); -- 2.26.0.106.g9fadedd