Skip to contentSkip to conversation

staging: rtl8192u: Fix sparse warning

PATCH In review Marcos Paulo de Souza 2 participants 3 messages Apr 23, 2017 – Apr 28, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8192u: Fix sparse warning

Fix the following sparse warning:
rtl8192u/ieee80211/ieee80211_rx.c:1489:45: warning: incorrect type in assignment (different base types)
rtl8192u/ieee80211/ieee80211_rx.c:1489:45: expected restricted __le16 <noident>
rtl8192u/ieee80211/ieee80211_rx.c:1489:45: got unsigned short [unsigned] [usertype] <noident>

Since ac_params->tx_op_limit is already an __le16, we shouldn't convert it into cpu type.

---

Sorry, I don't have the hardware to test, so please review and tell me if I'm wrong in this one!

 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +1 -1
index 5241c50..3a6a533 100644
@@ -1486,7 +1486,7 @@ static int ieee80211_qos_convert_ac_to_parameters(struct
 
 		qos_param->flag[aci] =
 		    (ac_params->aci_aifsn & 0x10) ? 0x01 : 0x00;
-		qos_param->tx_op_limit[aci] = le16_to_cpu(ac_params->tx_op_limit);
+		qos_param->tx_op_limit[aci] = ac_params->tx_op_limit;
 	}
 	return 0;
 }
Signature · 1 line
2.9.3
#1 lore raw
Quoted 11 lines · Marcos Paulo de Souza

Fix the following sparse warning:
rtl8192u/ieee80211/ieee80211_rx.c:1489:45: warning: incorrect type in assignment (different base types)
rtl8192u/ieee80211/ieee80211_rx.c:1489:45: expected restricted __le16 <noident>
rtl8192u/ieee80211/ieee80211_rx.c:1489:45: got unsigned short [unsigned] [usertype] <noident>

Since ac_params->tx_op_limit is already an __le16, we shouldn't convert it into cpu type.

---

Sorry, I don't have the hardware to test, so please review and tell me if I'm wrong in this one!

Patch doesn't apply to my tree at all :(

#2 lore raw
Quoted 6 lines · Greg Kroah-Hartman
Quoted 5 lines · Marcos Paulo de Souza

Fix the following sparse warning:
rtl8192u/ieee80211/ieee80211_rx.c:1489:45: warning: incorrect type in assignment (different base types)
rtl8192u/ieee80211/ieee80211_rx.c:1489:45: expected restricted __le16 <noident>
rtl8192u/ieee80211/ieee80211_rx.c:1489:45: got unsigned short [unsigned] [usertype] <noident>

Quoted 8 lines
Quoted 6 lines

Since ac_params->tx_op_limit is already an __le16, we shouldn't convert it into cpu type.

---

Sorry, I don't have the hardware to test, so please review and tell me if I'm wrong in this one!

Patch doesn't apply to my tree at all :(

My patch was based on master... my apologies. Will resend based on staging-next.

Signature · 2 lines
Thanks,
	Marcos