]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: rtl8723au: remove unnecessary le32_to_cpu
authorMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Tue, 1 Sep 2015 23:35:00 +0000 (01:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:38 +0000 (18:24 -0700)
The values passed to le32_to_cpu are already in the correct byte order.
This fixes four "cast to restricted __le32" sparse warnings.

Signed-off-by: Michał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_security.c

index 82518cd3433a2d186a601c0df27a4b2a15391876..038b57b3afe27314aee0759c56dc2b6d026e27d4 100644 (file)
@@ -245,8 +245,8 @@ void rtw_wep_decrypt23a(struct rtw_adapter *padapter,
        arcfour_encrypt(&mycontext, payload, payload, length);
 
        /* calculate icv and compare the icv */
-       actual_crc = le32_to_cpu(getcrc32(payload, length - 4));
-       expected_crc = le32_to_cpu(get_unaligned_le32(&payload[length - 4]));
+       actual_crc = getcrc32(payload, length - 4);
+       expected_crc = get_unaligned_le32(&payload[length - 4]);
 
        if (actual_crc != expected_crc) {
                RT_TRACE(_module_rtl871x_security_c_, _drv_err_,
@@ -767,8 +767,8 @@ int rtw_tkip_decrypt23a(struct rtw_adapter *padapter,
        arcfour_init(&mycontext, rc4key, 16);
        arcfour_encrypt(&mycontext, payload, payload, length);
 
-       actual_crc = le32_to_cpu(getcrc32(payload, length - 4));
-       expected_crc = le32_to_cpu(get_unaligned_le32(&payload[length - 4]));
+       actual_crc = getcrc32(payload, length - 4);
+       expected_crc = get_unaligned_le32(&payload[length - 4]);
 
        if (actual_crc != expected_crc) {
                RT_TRACE(_module_rtl871x_security_c_, _drv_err_,