Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6445940ybi; Wed, 29 May 2019 07:58:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzoNbMJU6A60/xVvP2PI+NFEVJ5n1L/nF39EM8IfRTeaR3lu+/1xpJpXjgJBWN/8NttbeF X-Received: by 2002:a62:2805:: with SMTP id o5mr149350468pfo.256.1559141934438; Wed, 29 May 2019 07:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559141934; cv=none; d=google.com; s=arc-20160816; b=bVmIKUeLabPQzlvmbLTTwEETGiBLh8uf4PgPiLlJPWGDnfsEXj22knh3whbnG3Y7H9 +sCLSGX687kIJAJe0GcxK2Tu4kmmayQJl3u07FDaSEKYDODSlQUhhkOzQ4/LbeHVvDuA h6KBjPW1b5rGgFJgU8DT1AgV+K6umjT2NUOfLgI9C8j7S/I84NN1Vhlj1G3aWxVt0hJ0 epEW1flmBGBj3GjDiAsel+U0XKY7hrZa2Gdh3HViL+0ZWpJVdPo5lMdp0j4W4AtSOzP/ pn70XLue821jnq2b9dp0ROxkGifyBO1b2uDLZYtRiD5LQlTthDTl64s4SGeGnVt3fLyA mOcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=9Hfvd8mJ1m7sRktOMmAdPrMjVy/Oe15QS43L7btW7GU=; b=LhLWgNavp2kcqq6EV3a/hz0t6cJolmHbqSm/5PKRpmSqXE+LMCXVrMqdmLLt2NJi0v ZUsHPvnjcsP0iPIKH57OmgzAXsbkjrE33jdz3n/K8gEX5wj2cgNgEPFTSaKtkw1aKY9B PMm+jojIG2VW03fpe4iuvDvF3xlj3wzQMEdz/9jUo/jDfaxG4tVNqK/VFg6CKJYqnCJa vhWy7ZXJVatGPQeahn2+wHotThcAfIkQYfH3trLEtlHzfJjxmSDwwyrfPZCapjBoIxKY ugCJNBULZm+h5FgCYSjTtmnTpdeIILXoy41rxcYSex3AfN3uXvRcBJikJcJ/1S9vvcm5 an3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si28745509pfe.111.2019.05.29.07.58.36; Wed, 29 May 2019 07:58:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726504AbfE2O6Y (ORCPT + 99 others); Wed, 29 May 2019 10:58:24 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:55022 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726087AbfE2O6Y (ORCPT ); Wed, 29 May 2019 10:58:24 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0D5251411A3C0405980B; Wed, 29 May 2019 22:58:05 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Wed, 29 May 2019 22:57:56 +0800 From: YueHaibing To: , , CC: , , , YueHaibing Subject: [PATCH] rtw88: Remove set but not used variable 'ip_sel' and 'orig' Date: Wed, 29 May 2019 22:57:40 +0800 Message-ID: <20190529145740.22804-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warnings: drivers/net/wireless/realtek/rtw88/pci.c: In function rtw_pci_phy_cfg: drivers/net/wireless/realtek/rtw88/pci.c:978:6: warning: variable ip_sel set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtw88/phy.c: In function phy_tx_power_limit_config: drivers/net/wireless/realtek/rtw88/phy.c:1607:11: warning: variable orig set but not used [-Wunused-but-set-variable] They are never used, so can be removed. Signed-off-by: YueHaibing --- drivers/net/wireless/realtek/rtw88/pci.c | 3 --- drivers/net/wireless/realtek/rtw88/phy.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c index 353871c27779..8329f4e447b7 100644 --- a/drivers/net/wireless/realtek/rtw88/pci.c +++ b/drivers/net/wireless/realtek/rtw88/pci.c @@ -977,7 +977,6 @@ static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev) u16 cut; u16 value; u16 offset; - u16 ip_sel; int i; cut = BIT(0) << rtwdev->hal.cut_version; @@ -990,7 +989,6 @@ static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev) break; offset = para->offset; value = para->value; - ip_sel = para->ip_sel; if (para->ip_sel == RTW_IP_SEL_PHY) rtw_mdio_write(rtwdev, offset, value, true); else @@ -1005,7 +1003,6 @@ static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev) break; offset = para->offset; value = para->value; - ip_sel = para->ip_sel; if (para->ip_sel == RTW_IP_SEL_PHY) rtw_mdio_write(rtwdev, offset, value, false); else diff --git a/drivers/net/wireless/realtek/rtw88/phy.c b/drivers/net/wireless/realtek/rtw88/phy.c index 404d89432c96..c3e75ffe27b5 100644 --- a/drivers/net/wireless/realtek/rtw88/phy.c +++ b/drivers/net/wireless/realtek/rtw88/phy.c @@ -1604,12 +1604,11 @@ void rtw_phy_tx_power_by_rate_config(struct rtw_hal *hal) static void phy_tx_power_limit_config(struct rtw_hal *hal, u8 regd, u8 bw, u8 rs) { - s8 base, orig; + s8 base; u8 ch; for (ch = 0; ch < RTW_MAX_CHANNEL_NUM_2G; ch++) { base = hal->tx_pwr_by_rate_base_2g[0][rs]; - orig = hal->tx_pwr_limit_2g[regd][bw][rs][ch]; hal->tx_pwr_limit_2g[regd][bw][rs][ch] -= base; } -- 2.17.1