From patchwork Mon Oct 12 16:21:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 11833281 X-Patchwork-Delegate: nbd@nbd.name 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 7C820139F for ; Mon, 12 Oct 2020 16:21:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 56E742080A for ; Mon, 12 Oct 2020 16:21:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="sMg9/8q2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390257AbgJLQVh (ORCPT ); Mon, 12 Oct 2020 12:21:37 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:45042 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2390130AbgJLQVh (ORCPT ); Mon, 12 Oct 2020 12:21:37 -0400 X-UUID: 1d9b395a728b451a9eda6026476b3ff8-20201013 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=waJ1Cl7TmNEDBI+o8ifx+7GweQsvOZGboSlY0FOCwaY=; b=sMg9/8q2/vuSQXz9nw8eO2u27/svQ8kop974j2b+NTy2JphMvCcYNAtigGPGSzL/eiMIbPzeV+GJE8FS8N8Xg9HuxLHIZ5iJ21rdIzi0DwiCPynF0d+CZBpVrBbpKjIFjzHP+WR69S37A5y3NmM2exypN0jzmk2s41MS6anVATQ=; X-UUID: 1d9b395a728b451a9eda6026476b3ff8-20201013 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 711164395; Tue, 13 Oct 2020 00:21:31 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 13 Oct 2020 00:21:21 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 13 Oct 2020 00:21:22 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH] mt76: mt7915: fix sparse warning cast from restricted __le16 Date: Tue, 13 Oct 2020 00:21:21 +0800 Message-ID: X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-SNTS-SMTP: D012C46E0D2F8B7A1F5C40D17353E05C647CCE7B7507DB6FE6A8C4E4F47006402000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse: sparse: cast from restricted __le16 Fixes: 00b2e16 ("mt76: mt7915: add TxBF capabilities") Reported-by: kernel test robot Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c index 51eeb78ca077..2457126fc823 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c @@ -351,7 +351,7 @@ mt7915_set_stream_he_txbf_caps(struct ieee80211_sta_he_cap *he_cap, elem->phy_cap_info[4] |= IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER; /* num_snd_dim */ - c = (nss - 1) | (max_t(int, mcs->tx_mcs_160, 1) << 3); + c = (nss - 1) | (max_t(int, le16_to_cpu(mcs->tx_mcs_160), 1) << 3); elem->phy_cap_info[5] |= c; c = IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB |