2024-04-26 05:33:14

by Mingyen Hsieh

[permalink] [raw]
Subject: [PATCH] wifi: mt76: mt7921: fix sparse warning for incorrect data type definition

From: Ming Yen Hsieh <[email protected]>

Sparse warn:
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:263:20: warning: cast to restricted __le32

For the member of 'struct mt76_connac_rssi_notify_event',
replace data type of rssi from 's32' to '__le32'

Fixes: f01224e61c74 ("wifi: mt76: mt7921: cqm rssi low/high event notify")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
---
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
index 340942fd6785..6873ce14d299 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
@@ -1460,7 +1460,7 @@ struct mt76_connac_beacon_loss_event {
} __packed;

struct mt76_connac_rssi_notify_event {
- s32 rssi[4];
+ __le32 rssi[4];
} __packed;

struct mt76_connac_mcu_bss_event {
--
2.18.0