From patchwork Tue Jul 21 08:39:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Yongjun X-Patchwork-Id: 11675235 X-Patchwork-Delegate: kvalo@adurom.com 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 3A5EB1392 for ; Tue, 21 Jul 2020 08:39:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A50920709 for ; Tue, 21 Jul 2020 08:39:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728852AbgGUIjs (ORCPT ); Tue, 21 Jul 2020 04:39:48 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8342 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728418AbgGUIjs (ORCPT ); Tue, 21 Jul 2020 04:39:48 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8CB22C6357DD61580D5E; Tue, 21 Jul 2020 16:39:45 +0800 (CST) Received: from ubuntu.network (10.175.138.68) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Tue, 21 Jul 2020 16:39:36 +0800 From: Zheng Yongjun To: , CC: , Zheng Yongjun Subject: [PATCH] drivers: bcma: remove set but not used variable `addrh` and `sizeh` Date: Tue, 21 Jul 2020 16:39:35 +0800 Message-ID: <20200721083935.13306-1-zhengyongjun3@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.138.68] 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/bcma/scan.c: In function 'bcma_erom_get_addr_desc': drivers/bcma/scan.c:219 warning: variable `addrh` and `sizeh` set but not used [-Wunused-but-set-variable] Signed-off-by: Zheng Yongjun --- drivers/bcma/scan.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c index 1a942f734188..d49e7c0de2b6 100644 --- a/drivers/bcma/scan.c +++ b/drivers/bcma/scan.c @@ -219,7 +219,7 @@ static s32 bcma_erom_get_mst_port(struct bcma_bus *bus, u32 __iomem **eromptr) static u32 bcma_erom_get_addr_desc(struct bcma_bus *bus, u32 __iomem **eromptr, u32 type, u8 port) { - u32 addrl, addrh, sizeh = 0; + u32 addrl; u32 size; u32 ent = bcma_erom_get_ent(bus, eromptr); @@ -233,14 +233,12 @@ static u32 bcma_erom_get_addr_desc(struct bcma_bus *bus, u32 __iomem **eromptr, addrl = ent & SCAN_ADDR_ADDR; if (ent & SCAN_ADDR_AG32) - addrh = bcma_erom_get_ent(bus, eromptr); - else - addrh = 0; + bcma_erom_get_ent(bus, eromptr); if ((ent & SCAN_ADDR_SZ) == SCAN_ADDR_SZ_SZD) { size = bcma_erom_get_ent(bus, eromptr); if (size & SCAN_SIZE_SG32) - sizeh = bcma_erom_get_ent(bus, eromptr); + bcma_erom_get_ent(bus, eromptr); } return addrl;