From patchwork Mon Sep 7 14:10:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wang Hai X-Patchwork-Id: 11761629 X-Patchwork-Delegate: nbd@nbd.name Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C20ED15AB for ; Mon, 7 Sep 2020 17:14:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B084821532 for ; Mon, 7 Sep 2020 17:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729778AbgIGOOZ (ORCPT ); Mon, 7 Sep 2020 10:14:25 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:38474 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729549AbgIGONW (ORCPT ); Mon, 7 Sep 2020 10:13:22 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 936D919DCD516F507D67; Mon, 7 Sep 2020 22:12:44 +0800 (CST) Received: from huawei.com (10.175.113.133) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 22:12:40 +0800 From: Wang Hai To: , , , , , , , , CC: , , , Subject: [PATCH net-next] mt76: mt7615: Remove set but unused variable 'index' Date: Mon, 7 Sep 2020 22:10:02 +0800 Message-ID: <20200907141002.10745-1-wanghai38@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.133] 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/mediatek/mt76/mt7615/testmode.c: In function mt7615_tm_set_tx_power drivers/net/wireless/mediatek/mt76/mt7615/testmode.c:83:7: warning: variable ‘index’ set but not used [-Wunused-but-set-variable]= commit 4f0bce1c8888 ("mt76: mt7615: implement testmode support") involved this unused variable, remove it. Signed-off-by: Wang Hai --- drivers/net/wireless/mediatek/mt76/mt7615/testmode.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/testmode.c b/drivers/net/wireless/mediatek/mt76/mt7615/testmode.c index 1730751133aa..de39ea8adb96 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/testmode.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/testmode.c @@ -80,13 +80,10 @@ mt7615_tm_set_tx_power(struct mt7615_phy *phy) target_chains = mt7615_ext_pa_enabled(dev, band) ? 1 : n_chains; for (i = 0; i < target_chains; i++) { - int index; - ret = mt7615_eeprom_get_target_power_index(dev, chandef->chan, i); if (ret < 0) return -EINVAL; - index = ret - MT_EE_NIC_CONF_0; if (tx_power && tx_power[i]) data[ret - MT_EE_NIC_CONF_0] = tx_power[i]; }