From patchwork Tue Oct 9 01:45:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10631741 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E3F1714DB for ; Tue, 9 Oct 2018 01:34:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB16628BD4 for ; Tue, 9 Oct 2018 01:34:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAF2A29DE7; Tue, 9 Oct 2018 01:34:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23C3C28BD4 for ; Tue, 9 Oct 2018 01:34:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbeJIItT (ORCPT ); Tue, 9 Oct 2018 04:49:19 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13204 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726434AbeJIItT (ORCPT ); Tue, 9 Oct 2018 04:49:19 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7197BF02F36C1; Tue, 9 Oct 2018 09:34:47 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.399.0; Tue, 9 Oct 2018 09:34:40 +0800 From: YueHaibing To: Kalle Valo , Felix Fietkau , "Lorenzo Bianconi" , Stanislaw Gruszka CC: YueHaibing , , , , Subject: [PATCH v2] mt76x0: pci: fix set external PA I/O current Date: Tue, 9 Oct 2018 01:45:59 +0000 Message-ID: <1539049559-178175-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539004909-195005-1-git-send-email-yuehaibing@huawei.com> References: <1539004909-195005-1-git-send-email-yuehaibing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/mediatek/mt76/mt76x0/pci.c: In function 'mt76x0e_register_device': drivers/net/wireless/mediatek/mt76/mt76x0/pci.c:107:8: warning: variable 'data' set but not used [-Wunused-but-set-variable] It seems correct value to write is 'data' Fixes: 2b2cb40bcd7d ("mt76x0: pci: add hw initialization at bootstrap") Signed-off-by: YueHaibing Acked-by: Lorenzo Bianconi --- v2: remove 'net-next' from patch title --- drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c index 87997cd..0426c68 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c @@ -106,12 +106,12 @@ static int mt76x0e_register_device(struct mt76x02_dev *dev) if (val & MT_EE_NIC_CONF_0_PA_IO_CURRENT) { u32 data; - /* set external external PA I/O + /* set external PA I/O * current to 16mA */ data = mt76_rr(dev, 0x11c); - val |= 0xc03; - mt76_wr(dev, 0x11c, val); + data |= 0xc03; + mt76_wr(dev, 0x11c, data); } }