staging: rtl8712: Fix some Sparse endian messages
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 11 Feb 2017 03:30:24 +0000 (21:30 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Feb 2017 12:26:55 +0000 (13:26 +0100)
Sparse reports the following:

  CHECK   drivers/staging/rtl8712/rtl8712_xmit.c
drivers/staging/rtl8712/rtl8712_xmit.c:564:42: warning: cast from restricted __le32
drivers/staging/rtl8712/rtl8712_xmit.c:569:42: warning: cast from restricted __le32
drivers/staging/rtl8712/rtl8712_xmit.c:571:42: warning: cast from restricted __le32

Each of these cases is transferring a quantity that is little-endian. There
is no need for conversion.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_xmit.c

index 4231a0a830978307903a9682b1783bac70e6fd11..7fe626583c8ae6603662a149c64822fad306386d 100644 (file)
@@ -561,14 +561,14 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
 
                        ptxdesc_mp = &txdesc_mp;
                        /* offset 8 */
-                       ptxdesc->txdw2 = cpu_to_le32(ptxdesc_mp->txdw2);
+                       ptxdesc->txdw2 = ptxdesc_mp->txdw2;
                        if (bmcst)
                                ptxdesc->txdw2 |= cpu_to_le32(BMC);
                        ptxdesc->txdw2 |= cpu_to_le32(BK);
                        /* offset 16 */
-                       ptxdesc->txdw4 = cpu_to_le32(ptxdesc_mp->txdw4);
+                       ptxdesc->txdw4 = ptxdesc_mp->txdw4;
                        /* offset 20 */
-                       ptxdesc->txdw5 = cpu_to_le32(ptxdesc_mp->txdw5);
+                       ptxdesc->txdw5 = ptxdesc_mp->txdw5;
                        pattrib->pctrl = 0;/* reset to zero; */
                }
        } else if (pxmitframe->frame_tag == MGNT_FRAMETAG) {