Merge tag 'trace-fixes-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux-2.6-microblaze.git] / drivers / staging / rtl8192e / rtllib_endianfree.h
index b268605..b189fa5 100644 (file)
@@ -33,9 +33,9 @@
 #define ReadEF2Byte(_ptr)              EF2Byte(*((u16 *)(_ptr)))
 #define ReadEF4Byte(_ptr)              EF4Byte(*((u32 *)(_ptr)))
 
-#define WriteEF1Byte(_ptr, _val)       (*((u8 *)(_ptr))) = EF1Byte(_val)
-#define WriteEF2Byte(_ptr, _val)       (*((u16 *)(_ptr))) = EF2Byte(_val)
-#define WriteEF4Byte(_ptr, _val)       (*((u32 *)(_ptr))) = EF4Byte(_val)
+#define WriteEF1Byte(_ptr, _val)       ((*((u8 *)(_ptr))) = EF1Byte(_val))
+#define WriteEF2Byte(_ptr, _val)       ((*((u16 *)(_ptr))) = EF2Byte(_val))
+#define WriteEF4Byte(_ptr, _val)       ((*((u32 *)(_ptr))) = EF4Byte(_val))
 #if BYTE_ORDER == __MACHINE_LITTLE_ENDIAN
 #define H2N1BYTE(_val) ((u8)(_val))
 #define H2N2BYTE(_val) (((((u16)(_val))&0x00ff)<<8)|\
          (~BIT_OFFSET_LEN_MASK_32(__BitOffset, __BitLen)) \
        )
 
-#define SET_BITS_TO_LE_4BYTE(__pStart, __BitOffset, __BitLen, __Value) \
-       *((u32 *)(__pStart)) = \
-       EF4Byte( \
-       LE_BITS_CLEARED_TO_4BYTE(__pStart, __BitOffset, __BitLen) \
-       | \
-       ((((u32)__Value) & BIT_LEN_MASK_32(__BitLen)) << (__BitOffset)) \
-       );
-
-
 #define BIT_LEN_MASK_16(__BitLen) \
        (0xFFFF >> (16 - (__BitLen)))
 
          BIT_LEN_MASK_16(__BitLen) \
        )
 
-#define LE_BITS_CLEARED_TO_2BYTE(__pStart, __BitOffset, __BitLen) \
-       ( \
-         LE_P2BYTE_TO_HOST_2BYTE(__pStart) \
-         & \
-         (~BIT_OFFSET_LEN_MASK_16(__BitOffset, __BitLen)) \
-       )
-
-#define SET_BITS_TO_LE_2BYTE(__pStart, __BitOffset, __BitLen, __Value) \
-       *((u16 *)(__pStart)) = \
-       EF2Byte( \
-               LE_BITS_CLEARED_TO_2BYTE(__pStart, __BitOffset, __BitLen) \
-               | ((((u16)__Value) & BIT_LEN_MASK_16(__BitLen)) <<      \
-               (__BitOffset)) \
-       );
-
 #define BIT_LEN_MASK_8(__BitLen) \
        (0xFF >> (8 - (__BitLen)))
 
          BIT_LEN_MASK_8(__BitLen) \
        )
 
-#define LE_BITS_CLEARED_TO_1BYTE(__pStart, __BitOffset, __BitLen) \
-       ( \
-         LE_P1BYTE_TO_HOST_1BYTE(__pStart) \
-         & \
-         (~BIT_OFFSET_LEN_MASK_8(__BitOffset, __BitLen)) \
-       )
-
-#define SET_BITS_TO_LE_1BYTE(__pStart, __BitOffset, __BitLen, __Value) \
-       *((u8 *)(__pStart)) = EF1Byte(                                  \
-               LE_BITS_CLEARED_TO_1BYTE(__pStart, __BitOffset, __BitLen) \
-               | ((((u8)__Value) & BIT_LEN_MASK_8(__BitLen)) <<        \
-               (__BitOffset))                                          \
-       );
-
 #define        N_BYTE_ALIGMENT(__Value, __Aligment)                    \
         ((__Aligment == 1) ? (__Value) : (((__Value + __Aligment - 1) / \
        __Aligment) * __Aligment))