[PATCH 06/15] staging: rtl8723bs: put parentheses on macros with complex values in include/hal_com.h

From: Fabio Aiuto
Date: Fri Mar 26 2021 - 05:10:30 EST


fix the following checkpatch warnings:

ERROR: Macros with complex values should be enclosed in parentheses
187: FILE: drivers/staging/rtl8723bs/include/hal_com.h:187:
+#define PageNum_128(_Len)
(u32)(((_Len)>>7) + ((_Len)&0x7F ? 1:0))
--
ERROR: Macros with complex values should be enclosed in parentheses
188: FILE: drivers/staging/rtl8723bs/include/hal_com.h:188:
+#define PageNum_256(_Len)
(u32)(((_Len)>>8) + ((_Len)&0xFF ? 1:0))
--
ERROR: Macros with complex values should be enclosed in parentheses
189: FILE: drivers/staging/rtl8723bs/include/hal_com.h:189:
+#define PageNum_512(_Len)
(u32)(((_Len)>>9) + ((_Len)&0x1FF ? 1:0))
--
ERROR: Macros with complex values should be enclosed in parentheses
190: FILE: drivers/staging/rtl8723bs/include/hal_com.h:190:
+#define PageNum(_Len, _Size)
(u32)(((_Len)/(_Size)) + ((_Len)&((_Size) - 1) ? 1:0))

Signed-off-by: Fabio Aiuto <fabioaiuto83@xxxxxxxxx>
---
drivers/staging/rtl8723bs/include/hal_com.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/hal_com.h b/drivers/staging/rtl8723bs/include/hal_com.h
index 28451385dec3..0bc0e1361765 100644
--- a/drivers/staging/rtl8723bs/include/hal_com.h
+++ b/drivers/staging/rtl8723bs/include/hal_com.h
@@ -184,10 +184,10 @@ enum firmware_source {
#define TX_SELE_NQ BIT(2) /* Normal Queue */
#define TX_SELE_EQ BIT(3) /* Extern Queue */

-#define PageNum_128(_Len) (u32)(((_Len)>>7) + ((_Len)&0x7F ? 1:0))
-#define PageNum_256(_Len) (u32)(((_Len)>>8) + ((_Len)&0xFF ? 1:0))
-#define PageNum_512(_Len) (u32)(((_Len)>>9) + ((_Len)&0x1FF ? 1:0))
-#define PageNum(_Len, _Size) (u32)(((_Len)/(_Size)) + ((_Len)&((_Size) - 1) ? 1:0))
+#define PageNum_128(_Len) ((u32)(((_Len)>>7) + ((_Len)&0x7F ? 1:0)))
+#define PageNum_256(_Len) ((u32)(((_Len)>>8) + ((_Len)&0xFF ? 1:0)))
+#define PageNum_512(_Len) ((u32)(((_Len)>>9) + ((_Len)&0x1FF ? 1:0)))
+#define PageNum(_Len, _Size) ((u32)(((_Len)/(_Size)) + ((_Len)&((_Size) - 1) ? 1:0)))


u8 rtw_hal_data_init(struct adapter *padapter);
--
2.20.1