]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: rtl8712: changed u16 to __be16
authorJannik Becher <becher.jannik@gmail.com>
Tue, 20 Dec 2016 17:59:49 +0000 (18:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jan 2017 15:51:17 +0000 (16:51 +0100)
Fixed sparse warning.
Just changed u16 to __be16 and typecasts.

Signed-off-by: Jannik Becher <becher.jannik@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_recv.c

index 66f0e0a35167df655ea07c3c59302633a185e825..1332b46b670833712fb24c61ce0f64119333bc57 100644 (file)
@@ -408,7 +408,7 @@ static int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe)
                        memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst,
                                ETH_ALEN);
                } else {
-                       u16 len;
+                       __be16 len;
                        /* Leave Ethernet header part of hdr and full payload */
                        len = htons(sub_skb->len);
                        memcpy(skb_push(sub_skb, 2), &len, 2);
@@ -439,21 +439,21 @@ exit:
 
 void r8712_rxcmd_event_hdl(struct _adapter *padapter, void *prxcmdbuf)
 {
-       uint voffset;
+       __le32 voffset;
        u8 *poffset;
        u16 cmd_len, drvinfo_sz;
        struct recv_stat *prxstat;
 
        poffset = (u8 *)prxcmdbuf;
-       voffset = *(uint *)poffset;
+       voffset = *(__le32 *)poffset;
        prxstat = (struct recv_stat *)prxcmdbuf;
        drvinfo_sz = (le32_to_cpu(prxstat->rxdw0) & 0x000f0000) >> 16;
        drvinfo_sz <<= 3;
        poffset += RXDESC_SIZE + drvinfo_sz;
        do {
-               voffset  = *(uint *)poffset;
+               voffset  = *(__le32 *)poffset;
                cmd_len = (u16)(le32_to_cpu(voffset) & 0xffff);
-               r8712_event_handle(padapter, (uint *)poffset);
+               r8712_event_handle(padapter, (__le32 *)poffset);
                poffset += (cmd_len + 8);/*8 bytes alignment*/
        } while (le32_to_cpu(voffset) & BIT(31));