staging: rtl8723au: Fix sparse invalid assignment warnings
authorYannis Damigos <giannis.damigos@gmail.com>
Sat, 20 Dec 2014 16:47:27 +0000 (18:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2015 21:55:39 +0000 (13:55 -0800)
This is a patch to the hal/rtl8723au_xmit.c file that fixes the
following warnings found by sparse tool:

drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:88:22: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:88:22:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:88:22:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:91:22: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:91:22:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:91:22:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:99:22: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:99:22:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:99:22:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:103:30: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:103:30:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:103:30:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:106:38: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:106:38:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:106:38:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:108:38: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:108:38:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:108:38:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:112:38: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:112:38:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:112:38:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:120:22: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:120:22:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:120:22:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:123:30: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:123:30:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:123:30:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:125:30: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:125:30:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:125:30:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:129:30: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:129:30:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:129:30:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:184:51: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:184:51:    expected unsigned int [usertype] *pdw
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:184:51:    got restricted __le32 *<noident>
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:185:51: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:185:51:    expected unsigned int [usertype] *pdw
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:185:51:    got restricted __le32 *<noident>

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c

index 6070510bb470f7575c03220b9adb4dfc1e0ca98a..1759487329ab70905561d2aee96d37319b916431 100644 (file)
@@ -79,7 +79,7 @@ static void fill_txdesc_sectype(struct pkt_attrib *pattrib, struct tx_desc *ptxd
        }
 }
 
-static void fill_txdesc_vcs(struct pkt_attrib *pattrib, u32 *pdw)
+static void fill_txdesc_vcs(struct pkt_attrib *pattrib, __le32 *pdw)
 {
        /* DBG_8723A("cvs_mode =%d\n", pattrib->vcs_mode); */
 
@@ -114,7 +114,7 @@ static void fill_txdesc_vcs(struct pkt_attrib *pattrib, u32 *pdw)
        }
 }
 
-static void fill_txdesc_phy(struct pkt_attrib *pattrib, u32 *pdw)
+static void fill_txdesc_phy(struct pkt_attrib *pattrib, __le32 *pdw)
 {
        if (pattrib->ht_en) {
                *pdw |= (pattrib->bwmode&HT_CHANNEL_WIDTH_40) ? cpu_to_le32(BIT(25)) : 0;