From: Rashika Kheria Date: Sat, 2 Nov 2013 18:04:44 +0000 (+0530) Subject: Staging: rtl8192e: Fix incorrect type in assignment in rtllib_rx.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f5a0d0cd43f2a02af16a1c23fba8ae14f707d49;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Staging: rtl8192e: Fix incorrect type in assignment in rtllib_rx.c This patch fixes the following Sparse warning in rtllib_rx.c- drivers/staging/rtl8192e/rtllib_rx.c:493:37: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_rx.c:493:37: expected unsigned short [unsigned] [usertype] len drivers/staging/rtl8192e/rtllib_rx.c:493:37: got restricted __be16 [usertype] drivers/staging/rtl8192e/rtllib_rx.c:1227:37: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_rx.c:1227:37: expected unsigned short [unsigned] [usertype] len drivers/staging/rtl8192e/rtllib_rx.c:1227:37: got restricted __be16 [usertype] drivers/staging/rtl8192e/rtllib_rx.c:1635:40: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_rx.c:1635:40: expected restricted __le16 drivers/staging/rtl8192e/rtllib_rx.c:1635:40: got int drivers/staging/rtl8192e/rtllib_rx.c:1637:40: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_rx.c:1637:40: expected restricted __le16 drivers/staging/rtl8192e/rtllib_rx.c:1637:40: got int drivers/staging/rtl8192e/rtllib_rx.c:1641:45: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192e/rtllib_rx.c:1641:45: expected restricted __le16 drivers/staging/rtl8192e/rtllib_rx.c:1641:45: got unsigned short [unsigned] [usertype] Signed-off-by: Rashika Kheria Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 1a011b9b9da6..6aa837e1c512 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -490,7 +490,7 @@ void rtllib_indicate_packets(struct rtllib_device *ieee, struct rtllib_rxb **prx } else { u16 len; /* Leave Ethernet header part of hdr and full payload */ - len = htons(sub_skb->len); + len = sub_skb->len; memcpy(skb_push(sub_skb, 2), &len, 2); memcpy(skb_push(sub_skb, ETH_ALEN), prxb->src, ETH_ALEN); memcpy(skb_push(sub_skb, ETH_ALEN), prxb->dst, ETH_ALEN); @@ -1224,7 +1224,7 @@ static void rtllib_rx_indicate_pkt_legacy(struct rtllib_device *ieee, } else { u16 len; /* Leave Ethernet header part of hdr and full payload */ - len = htons(sub_skb->len); + len = sub_skb->len; memcpy(skb_push(sub_skb, 2), &len, 2); memcpy(skb_push(sub_skb, ETH_ALEN), src, ETH_ALEN); memcpy(skb_push(sub_skb, ETH_ALEN), dst, ETH_ALEN); @@ -1632,13 +1632,13 @@ static int rtllib_qos_convert_ac_to_parameters(struct rtllib_qos_parameter_info /* WMM spec P.11: The minimum value for AIFSN shall be 2 */ qos_param->aifs[aci] = (qos_param->aifs[aci] < 2) ? 2 : qos_param->aifs[aci]; - qos_param->cw_min[aci] = ac_params->ecw_min_max & 0x0F; + qos_param->cw_min[aci] = cpu_to_le16(ac_params->ecw_min_max & 0x0F); - qos_param->cw_max[aci] = (ac_params->ecw_min_max & 0xF0) >> 4; + qos_param->cw_max[aci] = cpu_to_le16((ac_params->ecw_min_max & 0xF0) >> 4); 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 rc; }