From patchwork Tue May 19 23:55:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 215572 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1D94C433E0 for ; Tue, 19 May 2020 23:55:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B6A2205CB for ; Tue, 19 May 2020 23:55:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="JDk5HyxF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726352AbgESXzS (ORCPT ); Tue, 19 May 2020 19:55:18 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:32617 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726344AbgESXzS (ORCPT ); Tue, 19 May 2020 19:55:18 -0400 X-UUID: 77478fdf2b0849f591c93769e2344aad-20200520 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=8kqyrElumNsY45waYnpVZ5j6emuNWsp65iuRPF2OPy8=; b=JDk5HyxFmdH+ReudNvicvpDpYWbv17XCpQBUT5J75e0oRc6O0yChhvZc3rKskq+5udZxSEWOW5eWKFNbdYU1pXmOBFcJ6b+dZFcPB0/X5+OClYmvGq5drs+4XPs8uZGaaCC2VhZ3mKC8gcQaUVmkIPzjKlirqNd8Yp/F0DzMHJM=; X-UUID: 77478fdf2b0849f591c93769e2344aad-20200520 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 127197549; Wed, 20 May 2020 07:55:14 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 20 May 2020 07:55:07 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 20 May 2020 07:55:07 +0800 From: Ryder Lee To: Felix Fietkau CC: , Ryder Lee Subject: [PATCH] mt76: fix kbuild test robot warnings Date: Wed, 20 May 2020 07:55:10 +0800 Message-ID: <82c0a9e246ea2a4e7344dcd7476f5cf491f7dde5.1589930747.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-SNTS-SMTP: 2BDF74708F1132860EAD3DBCD56F7204105AA38D027CC823719BD95C482080B62000:8 X-MTK: N Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix the following warnings: warning: comparison is always false/true due to limited range of data type [-Wtype-limits]. warning: variable 'msta' set but not used Reported-by: kbuild test robot Signed-off-by: Ryder Lee --- @felix, maybe fold this patch into the previous one (if it's not yet merged). --- drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt76x02.h | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 --- 6 files changed, 7 insertions(+), 10 deletions(-) -- 2.18.0 diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c index f8c0c957ca01..f40dc4374eee 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c @@ -468,7 +468,7 @@ void mt7603_mac_sta_poll(struct mt7603_dev *dev) } static struct mt76_wcid * -mt7603_rx_get_wcid(struct mt7603_dev *dev, u8 idx, bool unicast) +mt7603_rx_get_wcid(struct mt7603_dev *dev, u16 idx, bool unicast) { struct mt7603_sta *sta; struct mt76_wcid *wcid; @@ -1227,7 +1227,7 @@ void mt7603_mac_add_txs(struct mt7603_dev *dev, void *data) struct mt76_wcid *wcid; __le32 *txs_data = data; u32 txs; - u8 wcidx; + u16 wcidx; u8 pid; txs = le32_to_cpu(txs_data[4]); diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index 7d65a3fb0c23..08b950386bc8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -56,7 +56,7 @@ static const struct mt7615_dfs_radar_spec jp_radar_specs = { }; static struct mt76_wcid *mt7615_rx_get_wcid(struct mt7615_dev *dev, - u8 idx, bool unicast) + u16 idx, bool unicast) { struct mt7615_sta *sta; struct mt76_wcid *wcid; @@ -1291,7 +1291,7 @@ static void mt7615_mac_add_txs(struct mt7615_dev *dev, void *data) struct mt76_phy *mphy = &dev->mt76.phy; __le32 *txs_data = data; u32 txs; - u8 wcidx; + u16 wcidx; u8 pid; txs = le32_to_cpu(txs_data[0]); diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02.h b/drivers/net/wireless/mediatek/mt76/mt76x02.h index 6ea210bd3f07..5adcc9fa842a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x02.h @@ -242,7 +242,7 @@ mt76x02_wait_for_txrx_idle(struct mt76_dev *dev) } static inline struct mt76x02_sta * -mt76x02_rx_get_sta(struct mt76_dev *dev, u8 idx) +mt76x02_rx_get_sta(struct mt76_dev *dev, u16 idx) { struct mt76_wcid *wcid; diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c index a5a3bcd30d6f..a824412d1b8b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c @@ -778,7 +778,7 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb, int pad_len = 0, nstreams = dev->chainmask & 0xf; s8 signal; u8 pn_len; - u8 wcid; + u16 wcid; int len; if (!test_bit(MT76_STATE_RUNNING, &dev->mphy.state)) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h index c70d17b2290c..e4c405130e60 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h @@ -14,7 +14,7 @@ struct mt76x02_tx_status { u8 success:1; u8 aggr:1; u8 ack_req:1; - u8 wcid; + u16 wcid; u8 pktid; u8 retry; u16 rate; diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 95cd24f41f98..f81afcc51801 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -1836,15 +1836,12 @@ static u8 mt7915_mcu_sta_txbf_type(struct mt7915_phy *phy, struct ieee80211_vif *vif, struct ieee80211_sta *sta) { - struct mt7915_sta *msta; u8 type = 0; if (vif->type != NL80211_IFTYPE_STATION && vif->type != NL80211_IFTYPE_AP) return 0; - msta = (struct mt7915_sta *)sta->drv_priv; - if (sta->he_cap.has_he) { struct ieee80211_he_cap_elem *pe; const struct ieee80211_he_cap_elem *ve;