Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4322705rwb; Sat, 3 Dec 2022 23:20:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf6OQ54jdOCn+KjlNqTcsGCSh/ar4bsc1DY3QOxFETKwVKdBsYgN+Jxh9CI3Pp5QWMFTWy0r X-Received: by 2002:a17:90b:110b:b0:219:678f:ee79 with SMTP id gi11-20020a17090b110b00b00219678fee79mr20679478pjb.218.1670138458782; Sat, 03 Dec 2022 23:20:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670138458; cv=none; d=google.com; s=arc-20160816; b=vgU7/2RQEZUMLkTjAleutgUWzPl7y5/Xo4BCuUDB7CMLXg+ABdnifU11g4a7fDaQZH EbkvVV3urFFhItsQ7vBbxBzBGDyqNqaOsfC6oZ6SZJoNxV7u9/SMNd5OmwkTrXKIzcw/ shp0ZFKdXQvgq9I2Ymhw8t/h7RIcwTNTxMDE17AODiGcdvPggq3q1LJf/F+YFD5TDvYU cx8drT6g/NSFu5m2/UUgKbiCMDdqE0vRQP6NFLzlB8V1GVDjcPTJuhTgNmsJcM2iPOdS Gdc1c9cx+2g750vQH+Xf6wIGs8BeqYWLqq4/86Um9Iaw/HtVdcNY39UHoakFCjIJPSpM yt7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=3WsJ0K3ycmeFnfDgWNcOE8ZHRRc2nrQGDlBBOlFXtNE=; b=skYwsqhmHx7G26CucSuWp/Qqh9aQ+KJOoa5HM9pSLVYBD3t9d+xlQtqarX85OTO1ed jp0MdS0vqa2Z9YvRJeMmtmyYGFomrVSWMHakXEEdoNQyJ0dc6voLlDDfb8XH1mfABNV5 XuJH8Lu1dlvyvbwnJxpqjQMtVXyuC7vETr8Fbh2saJIu9IFQBlkaHkoJUgICvr8e/htk c+RLBMbrt0LA5oS81NRjuxVOV9WDYCLlunRRnWJENkXfvHSu/2c+nDE1xN7RAJ06q2yP gqoCVi0B9NJWDexB8bn/kGE0NJm3H8y8LFFqG7W2JG1l4nCbcNB1FCVf10HXtudfS5sy Sx2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="b5RYeBO/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c20-20020a6566d4000000b0047888d9f3aesi5615731pgw.547.2022.12.03.23.20.45; Sat, 03 Dec 2022 23:20:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="b5RYeBO/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229633AbiLDHSe (ORCPT + 66 others); Sun, 4 Dec 2022 02:18:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbiLDHSc (ORCPT ); Sun, 4 Dec 2022 02:18:32 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0644A12AEA for ; Sat, 3 Dec 2022 23:18:26 -0800 (PST) X-UUID: 9cda0bfe1a724a138270192ad2db7d99-20221204 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=3WsJ0K3ycmeFnfDgWNcOE8ZHRRc2nrQGDlBBOlFXtNE=; b=b5RYeBO/aBH0/3a35QyLB62ZSeOZxuqMvJHByyrUzLOzzah9Zovr/xWHKYr746MKZSzPAnlV2t9iUVOEh+5a2ppKb7BQm5IvyZt1G0qBvXvEjxQoFaWgXWyc9YmX09/aOIvOYxObpgrxBVu/5xCaXJiN9+NjaoMMIq5ZnjMOLHY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14,REQID:4705fac4-e21a-469a-bd70-01ca0795f5ea,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:dcaaed0,CLOUDID:71ab131f-5e1d-4ab5-ab8e-3e04efc02b30,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 9cda0bfe1a724a138270192ad2db7d99-20221204 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1933055902; Sun, 04 Dec 2022 15:18:18 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Sun, 4 Dec 2022 15:18:17 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Sun, 4 Dec 2022 15:18:17 +0800 From: Ryder Lee To: Felix Fietkau , CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , , Ryder Lee Subject: [PATCH 2/2] wifi: mt76: mt7996: drop always true condition of __mt7996_reg_addr() Date: Sun, 4 Dec 2022 15:18:15 +0800 Message-ID: <50f23916e9ec9082ab209fbb7ded9e211ad50384.1670137513.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org addr <= MT_CBTOP2_PHY_END(0xffffffff) is always true (<= u32max), so drop it. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/regs.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c index 521769eb6b0e..60781d046216 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c @@ -149,7 +149,7 @@ static u32 __mt7996_reg_addr(struct mt7996_dev *dev, u32 addr) if (dev_is_pci(dev->mt76.dev) && ((addr >= MT_CBTOP1_PHY_START && addr <= MT_CBTOP1_PHY_END) || - (addr >= MT_CBTOP2_PHY_START && addr <= MT_CBTOP2_PHY_END))) + addr >= MT_CBTOP2_PHY_START)) return mt7996_reg_map_l1(dev, addr); /* CONN_INFRA: covert to phyiscal addr and use layer 1 remap */ diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/regs.h b/drivers/net/wireless/mediatek/mt76/mt7996/regs.h index 794f61b93a46..42980b97b4d4 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/regs.h +++ b/drivers/net/wireless/mediatek/mt76/mt7996/regs.h @@ -463,7 +463,6 @@ enum base_rev { #define MT_CBTOP1_PHY_START 0x70000000 #define MT_CBTOP1_PHY_END 0x77ffffff #define MT_CBTOP2_PHY_START 0xf0000000 -#define MT_CBTOP2_PHY_END 0xffffffff #define MT_INFRA_MCU_START 0x7c000000 #define MT_INFRA_MCU_END 0x7c3fffff -- 2.18.0