Commit e8fa04fd authored by Mashiro Chen's avatar Mashiro Chen Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723bs: wrap complex macros with parentheses



Fix "COMPLEX_MACRO" errors reported by checkpatch.pl
by wrapping macro values in parentheses to ensure
correct operator precedence.

Signed-off-by: default avatarMashiro Chen <mashiro.chen@mailbox.org>
Reviewed-by: default avatarLuka Gejak <luka.gejak@linux.dev>
Link: https://patch.msgid.link/20260330114232.91431-3-mashiro.chen@mailbox.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e2b69a08
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -129,25 +129,25 @@
 * Set subfield of little-endian 4-byte value to specified value.
 */
#define SET_BITS_TO_LE_4BYTE(__pstart, __bitoffset, __bitlen, __val) \
		*((u32 *)(__pstart)) =				\
		(*((u32 *)(__pstart)) =				\
		(						\
		LE_BITS_CLEARED_TO_4BYTE(__pstart, __bitoffset, __bitlen) | \
		((((u32)__val) & BIT_LEN_MASK_32(__bitlen)) << (__bitoffset)) \
		)
		))

#define SET_BITS_TO_LE_2BYTE(__pstart, __bitoffset, __bitlen, __val) \
		*((u16 *)(__pstart)) =				\
		(*((u16 *)(__pstart)) =				\
		(					\
		LE_BITS_CLEARED_TO_2BYTE(__pstart, __bitoffset, __bitlen) | \
		((((u16)__val) & BIT_LEN_MASK_16(__bitlen)) << (__bitoffset)) \
		)
		))

#define SET_BITS_TO_LE_1BYTE(__pstart, __bitoffset, __bitlen, __val) \
		*((u8 *)(__pstart)) = EF1BYTE			\
		(*((u8 *)(__pstart)) = EF1BYTE			\
		(					\
		LE_BITS_CLEARED_TO_1BYTE(__pstart, __bitoffset, __bitlen) | \
		((((u8)__val) & BIT_LEN_MASK_8(__bitlen)) << (__bitoffset)) \
		)
		))

#define LE_BITS_CLEARED_TO_1BYTE_8BIT(__pStart, __BitOffset, __BitLen) \
	(\