Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp198862ybi; Wed, 29 May 2019 19:33:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxb94oKKBKKMZoSo2NNHu6h++lO8XtvxM0uZiWI+jcJGfXVEkNGAD1nI86UpSZ3CovgaVkw X-Received: by 2002:a62:cfc4:: with SMTP id b187mr1200835pfg.134.1559183624309; Wed, 29 May 2019 19:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559183624; cv=none; d=google.com; s=arc-20160816; b=UWpX+RUYmuuxpZb8ED9kqoz/UmbaK378I/Zxs8B6vicQ2YReTRZOlAlVrtj9WsOfH3 kzU7AlKNRLefP1vOQfv3xklGuYxjsfmBzQflk8Q6tLgYJBi1TXQBQORNp9j3a9YfeKa3 CyYvTmWOtX1qvbILvtuVq/0wXPAWvMS+WtyspO4gui8oo1s5uYXbSm6Do0fqVVn5Gk89 WMEMNC8Jhun9OqFy59Q2ciOYqnnJxAzpv+a+azklD3BEBhvZSU5Pkmte2RasBHKwgNGk /gCaSDcbisW4d9/AyKLMD9UeANTwMdxIXu/UaOa5EBFgMpd99SQZJA3ZlouIXYUPDXTV cSig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=QNKBYOe3H9m9+M3++VAAt3U9fCWLHjOgtKYPbtEPCCI=; b=jLra6HqrrC96g5+IDr+U7ZmzUrvxrvJPeYBei3nbtHJqDctJ0zIc09oHzSpiGQKLvD Xcdt3Gyfcwwg+UWrbvdvT4ARdX+UfmD5JLKAz+6BdfFoPYHbjnyA5mR1OSbfuMZQJCC1 KWkCCd/JtjEMW/XGkrwG4F16trA5wDuriCftA+NQkvIiib1hi9nCcOmBZluKb/pNFhuo VUlnJ30oFo9gYJF7qbWeukGhUxqnWHpHnogBLHNOhxiwWV3/A6aVtq/xFLdQi+QqfsZH mlWtqprQg0h0+HFEZido1DqAs6o1qZWO7XE0UA5Ck42qANEDSWIFlXj/9wfHuFmOXuaG NuhA== 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 j23si1708766pff.159.2019.05.29.19.33.28; Wed, 29 May 2019 19:33:44 -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 S1727025AbfE3CcW convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 May 2019 22:32:22 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:37548 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726483AbfE3CcV (ORCPT ); Wed, 29 May 2019 22:32:21 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x4U2W8mC004450, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtitcas12.realtek.com.tw[172.21.6.16]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x4U2W8mC004450 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 30 May 2019 10:32:08 +0800 Received: from RTITMBSVM04.realtek.com.tw ([fe80::e404:880:2ef1:1aa1]) by RTITCAS12.realtek.com.tw ([::1]) with mapi id 14.03.0439.000; Thu, 30 May 2019 10:32:08 +0800 From: Tony Chuang To: YueHaibing , "kvalo@codeaurora.org" , "davem@davemloft.net" CC: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-wireless@vger.kernel.org" Subject: RE: [PATCH] rtw88: Remove set but not used variable 'ip_sel' and 'orig' Thread-Topic: [PATCH] rtw88: Remove set but not used variable 'ip_sel' and 'orig' Thread-Index: AQHVFi7tVKme6Dla+EywC8esuGtTIaaC8s0g Date: Thu, 30 May 2019 02:32:08 +0000 Message-ID: References: <20190529145740.22804-1-yuehaibing@huawei.com> In-Reply-To: <20190529145740.22804-1-yuehaibing@huawei.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.68.183] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: YueHaibing [mailto:yuehaibing@huawei.com] > Sent: Wednesday, May 29, 2019 10:58 PM > To: Tony Chuang; kvalo@codeaurora.org; davem@davemloft.net > Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; > linux-wireless@vger.kernel.org; YueHaibing > Subject: [PATCH] rtw88: Remove set but not used variable 'ip_sel' and 'orig' > > 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; > } > Hi Haibing I have submitted a patch fix the unused variable in phy.c Which is, > 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] Can you drop the changes in phy.c and remain the changes in pci.c? Thanks. Yan-Hsuan