Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1806008ybv; Fri, 14 Feb 2020 06:22:06 -0800 (PST) X-Google-Smtp-Source: APXvYqxN1SwubfqUQkhH4U8tiW8vPmKUouNbAFQKIEx6MR43+ASsGGonL8BivOmo0o/tTPX6UPrt X-Received: by 2002:aca:ab51:: with SMTP id u78mr2007813oie.21.1581690126812; Fri, 14 Feb 2020 06:22:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581690126; cv=none; d=google.com; s=arc-20160816; b=hepti4ITDfakhDTTDryrZAEmk4SUzFGS0XCuzMk+b4RzZv5T2UJrPJGhhZtWCDMDc4 veGT+XOxLM4rluCLaGjul91wk/89MTQH5SV4UQolfOuw7NhqW/Ausuro/7f+vlDTKlLl a/woMyazz5dcogjXgnya0PNLILT7gJP8tZZ+h7W5OSLV6w48yi92BDFPTEK31bnI+E9F XeclbolZ4v5m3R1EepbQAynCp4ak97CAYno/Tusfft3kYq6lZLaQALsDyUHxPxbpHu9M Sbx/MAOYWMVOsOqni6Fw2ZrOGR/lT0kKocVRIK8feqgPM2tp6ILtzJ03rFC6BN1AXNKD FfFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=HCvDfMQYvXA5EY1MpUM7/+eD6QE4BxIWioIXbQzi0Lw=; b=X4q9guTC5GGD4PTrgwnD6R7nBeNxeL22h+FUNYhH4sR443pKQZNcK5BQGSUzZTr30w RGT2YAAfkwlJlvuyqnV3+8FKgPWpgpTcFT8b9cX1E3h4H7SUg1BnfI8qif8JHX8SwF46 oeLB4jtX+VJYqMj1GdNyJ+Vm9lqLnbV87Xnutn08/13hTNFeK1EVz29NkMs6mkwHY64/ adouLRBTcbUjTlmHqz/cZOOr6Pbh/zhrMZCS183D5mwWnErWfXkHaLKKn4SzEefcD6Ye qTdXUwF1Pjrx1rXYI1mCQo5HYtyETJKJQ+TnWar8ThfR0pbeSGDDI4SLlhq5VEhs8RRH HPjw== 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 s143si2508148oih.251.2020.02.14.06.21.43; Fri, 14 Feb 2020 06:22:06 -0800 (PST) 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 S1729314AbgBNOTp (ORCPT + 99 others); Fri, 14 Feb 2020 09:19:45 -0500 Received: from 220-134-220-36.HINET-IP.hinet.net ([220.134.220.36]:63084 "EHLO ns.kevlo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726191AbgBNOTp (ORCPT ); Fri, 14 Feb 2020 09:19:45 -0500 Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.15.2/8.15.2) with ESMTPS id 01EEGlqJ026360 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 14 Feb 2020 22:17:02 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.15.2/8.15.2/Submit) id 01EEGlcC026359; Fri, 14 Feb 2020 22:16:47 +0800 (CST) (envelope-from kevlo) Date: Fri, 14 Feb 2020 22:16:45 +0800 From: Kevin Lo To: Yan-Hsuan Chuang Cc: linux-wireless@vger.kernel.org Subject: [PATCH v2] rtw88: remove unused member of struct rtw_hal Message-ID: <20200214141645.GA26343@ns.kevlo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Remove unused fab_version member from struct rtw_hal. Some of the checks being made were nonsense. Signed-off-by: Kevin Lo --- v2: rebase on top of master --- diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index 2f73820cd9ba..dc93a4d04f25 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -1118,7 +1118,6 @@ static int rtw_chip_parameter_setup(struct rtw_dev *rtwdev) } hal->chip_version = rtw_read32(rtwdev, REG_SYS_CFG1); - hal->fab_version = BIT_GET_VENDOR_ID(hal->chip_version) >> 2; hal->cut_version = BIT_GET_CHIP_VER(hal->chip_version); hal->mp_chip = (hal->chip_version & BIT_RTL_ID) ? 0 : 1; if (hal->chip_version & BIT_RF_TYPE_ID) { @@ -1133,11 +1132,6 @@ static int rtw_chip_parameter_setup(struct rtw_dev *rtwdev) hal->antenna_rx = BB_PATH_A; } - if (hal->fab_version == 2) - hal->fab_version = 1; - else if (hal->fab_version == 1) - hal->fab_version = 2; - efuse->physical_size = chip->phy_efuse_size; efuse->logical_size = chip->log_efuse_size; efuse->protect_size = chip->ptct_efuse_size; diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h index c074cef22120..201ed8870754 100644 --- a/drivers/net/wireless/realtek/rtw88/main.h +++ b/drivers/net/wireless/realtek/rtw88/main.h @@ -1527,7 +1527,6 @@ struct rtw_hal { u32 rcr; u32 chip_version; - u8 fab_version; u8 cut_version; u8 mp_chip; u8 oem_id;