linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt76: mt7915: fix sparse warning cast from restricted __le16
@ 2020-10-12 16:21 Ryder Lee
  2020-10-12 16:36 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Ryder Lee @ 2020-10-12 16:21 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi
  Cc: linux-mediatek, Ryder Lee, linux-wireless, Shayne Chen

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 <lkp@intel.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 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 |
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mt76: mt7915: fix sparse warning cast from restricted __le16
  2020-10-12 16:21 [PATCH] mt76: mt7915: fix sparse warning cast from restricted __le16 Ryder Lee
@ 2020-10-12 16:36 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-10-12 16:36 UTC (permalink / raw)
  To: Ryder Lee
  Cc: linux-mediatek, Lorenzo Bianconi, Shayne Chen, linux-wireless,
	Felix Fietkau

Ryder Lee <ryder.lee@mediatek.com> writes:

> drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse:
> sparse: cast from restricted __le16
>
> Fixes: 00b2e16 ("mt76: mt7915: add TxBF capabilities")

Commit id is too short, it should be:

Fixes: 00b2e16e0063 ("mt76: mt7915: add TxBF capabilities")

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-12 16:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 16:21 [PATCH] mt76: mt7915: fix sparse warning cast from restricted __le16 Ryder Lee
2020-10-12 16:36 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).