Message ID | 8a4f5f1c5e9e02418a4652f08194378d4dca1655.1608673792.git.lorenzo@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Felix Fietkau |
Headers | show |
Series | mt76: mt7915: fix endianness warning in mt7915_mcu_set_radar_th | expand |
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 5fdd1a6d32ee..6665a4dc1e98 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -3129,8 +3129,8 @@ int mt7915_mcu_set_radar_th(struct mt7915_dev *dev, int index, u8 max_crpn; u8 min_crpr; u8 min_pw; - u32 min_pri; - u32 max_pri; + __le32 min_pri; + __le32 max_pri; u8 max_pw; u8 min_crbn; u8 max_crbn; @@ -3138,7 +3138,7 @@ int mt7915_mcu_set_radar_th(struct mt7915_dev *dev, int index, u8 max_stgpn; u8 min_stgpr; u8 rsv[2]; - u32 min_stgpr_diff; + __le32 min_stgpr_diff; } __packed req = { .tag = cpu_to_le32(0x2), .radar_type = cpu_to_le16(index),
Fix the following sparse warning in mt7915_mcu_set_radar_th routine: drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3154:17: warning: incorrect type in initializer (different base types) drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3154:17: expected unsigned int [usertype] min_pri drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3154:17: got restricted __le32 [usertype] drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3155:17: warning: incorrect type in initializer (different base types) drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3155:17: expected unsigned int [usertype] max_pri drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3155:17: got restricted __le32 [usertype] drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3162:17: warning: incorrect type in initializer (different base types) drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3162:17: expected unsigned int [usertype] min_stgpr_diff drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3162:17: got restricted __le32 [usertype] Fixes: cee236e1489ec ("mt76: mt7915: fix endian issues") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)