From patchwork Mon May 10 08:22:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 433057 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2625519jao; Mon, 10 May 2021 01:23:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza6qVD/MQ8FWSkMhzYpaNrLsP38AxRxD9qqSLtkH/U324++9Y41pz/M/aNNNxYVqq7vHcq X-Received: by 2002:a5d:9598:: with SMTP id a24mr17019477ioo.24.1620635030351; Mon, 10 May 2021 01:23:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620635030; cv=none; d=google.com; s=arc-20160816; b=jXieIGCzpRk9+pn7DSodhJZqAcRXZLXM6xAUdfxa9plx/FqOJB8tEh40Pc8GpYHZDP ZMeQe59qUrloDAMCWoVlxxsTDlCfQCHHQfa7V/ap130ywrEPhIlLNpRG4Rp8ccE6krx8 REwyYGWxxwKKv73KgbM50bSg9RtCY4tpvuCEfBCfjpETRm2i3/4UX7imptSDmG7dA5s+ Uxf6fFvp+SfrKuAAIjl1MqeBPfB2TRkfIufsH8ir4J8FpiXxFx1o5pJflXwMeWB9K0y8 wBGNFVb2G8LXBpytTdh24kjfbydz+Xfa++y2UKwo/76tWpIkmEdpWfe9q+jjeAzfm9qZ NWQQ== 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 k7si1266570iok.65.2021.05.10.01.23.50; Mon, 10 May 2021 01:23:50 -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 + 2 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 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(-) -- 2.26.0.106.g9fadedd 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);