Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6676394ybn; Mon, 30 Sep 2019 01:49:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgn7q/HmDiFrmU+JMQcuCskvHbI9h2s+iWVO1Ptjjgu/H1ahw2p/t4zPN42fDvX8b3sehD X-Received: by 2002:aa7:d988:: with SMTP id u8mr18177222eds.116.1569833397038; Mon, 30 Sep 2019 01:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569833397; cv=none; d=google.com; s=arc-20160816; b=cj7/zd/YChzyYDr2Lqu8saLllxre0i1qMcJbHdf9fGh1ZjFCDFb3n/JKVH28zU1Ggu S1YgAtu47hWiFlEUlsWwnOsefxNqY3pPtXCMNG3LqUz9bq2EwfFiv4sJ0vzOBJt0eKVQ BCMT1tyJli6wdhUOe1FWwptdbkVlqp0acZFhRIFwqe0VpHleqWYVH598dAxiBsDrXTGU RHMDK0TtwxMYfPxiBfhQqlDkJTPQzdzCuDRVXBFRnBN0NZw8M/3S7hmiAT+WS8fTc/Gv smfW0suX+WKd7nKBvW+b7X8L1mdkN1mgDF/0bK2xHU34ocnsrJe5Bcf0hpXkyXHHWYva yjwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=nsm4csUtNNTNsJ4lmMI+0750aKA8LeSJhHLJQY78KPU=; b=IJbbwdXCDR+uORU4b873Y7lZ9Nm6Rjz6PJwZIfWwJLuElSK4eSWtPVvkFYkqttKTSL 5AHEncycaZWqUYTjGkgXK0kar8I6u5DimduOzaFwFH2pNSPAIM8TJKf3lAxxu/PaB3tQ PasCdTCUZGem7TqKXe24l1ePpyQkgaAP1vODqtoDwo4SPUWo+rX8BqfbkerHEukBpYW1 GSo4EVoB+85Qa7tW1+fWIzK7udv3QbkTNZLa4XHYAF7gh9mBjVwvx+NDhZwwe/Gq/T8t 82Ao3f3yWUp6hsi6GCeA/88+oKpk8EgPi5k4qWCRVpelUBmxA7b//xNHf9INNZY0kIxN hOyw== 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 m55si6711345edc.17.2019.09.30.01.49.32; Mon, 30 Sep 2019 01:49:57 -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 S1730274AbfI3IsU (ORCPT + 99 others); Mon, 30 Sep 2019 04:48:20 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3184 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730131AbfI3IsU (ORCPT ); Mon, 30 Sep 2019 04:48:20 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3DA857E955F3AC177F5E; Mon, 30 Sep 2019 16:48:09 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Mon, 30 Sep 2019 16:47:59 +0800 From: zhengbin To: , , , , CC: Subject: [PATCH 2/6] rtlwifi: Remove set but not used variables 'dataempty','hoffset' Date: Mon, 30 Sep 2019 16:54:48 +0800 Message-ID: <1569833692-93288-3-git-send-email-zhengbin13@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1569833692-93288-1-git-send-email-zhengbin13@huawei.com> References: <1569833692-93288-1-git-send-email-zhengbin13@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] 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' warning: drivers/net/wireless/realtek/rtlwifi/efuse.c: In function efuse_pg_packet_write: drivers/net/wireless/realtek/rtlwifi/efuse.c:937:24: warning: variable dataempty set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/efuse.c: In function efuse_get_current_size: drivers/net/wireless/realtek/rtlwifi/efuse.c:1202:5: warning: variable hoffset set but not used [-Wunused-but-set-variable] They are not used since commit f1d2b4d338bf ("rtlwifi: rtl818x: Move drivers into new realtek directory") Reported-by: Hulk Robot Signed-off-by: zhengbin --- drivers/net/wireless/realtek/rtlwifi/efuse.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/efuse.c b/drivers/net/wireless/realtek/rtlwifi/efuse.c index 2646672..cef9f2a 100644 --- a/drivers/net/wireless/realtek/rtlwifi/efuse.c +++ b/drivers/net/wireless/realtek/rtlwifi/efuse.c @@ -915,7 +915,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv = rtl_priv(hw); struct pgpkt_struct target_pkt; u8 write_state = PG_STATE_HEADER; - int continual = true, dataempty = true, result = true; + int continual = true, result = true; u16 efuse_addr = 0; u8 efuse_data; u8 target_word_cnts = 0; @@ -942,7 +942,6 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, while (continual && (efuse_addr < (EFUSE_MAX_SIZE - rtlpriv->cfg->maps[EFUSE_OOB_PROTECT_BYTES_LEN]))) { if (write_state == PG_STATE_HEADER) { - dataempty = true; badworden = 0x0F; RTPRINT(rtlpriv, FEEPROM, EFUSE_PG, "efuse PG_STATE_HEADER\n"); @@ -1179,13 +1178,12 @@ static u16 efuse_get_current_size(struct ieee80211_hw *hw) { int continual = true; u16 efuse_addr = 0; - u8 hoffset, hworden; + u8 hworden; u8 efuse_data, word_cnts; while (continual && efuse_one_byte_read(hw, efuse_addr, &efuse_data) && (efuse_addr < EFUSE_MAX_SIZE)) { if (efuse_data != 0xFF) { - hoffset = (efuse_data >> 4) & 0x0F; hworden = efuse_data & 0x0F; word_cnts = efuse_calculate_word_cnts(hworden); efuse_addr = efuse_addr + (word_cnts * 2) + 1; -- 2.7.4