Fix all checkpatch errors on macros but the following:
ERROR: Macros with complex values should be enclosed in parentheses
#41: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:41:
+#define RTL8723B_TRANS_CARDEMU_TO_ACT \
--
ERROR: Macros with complex values should be enclosed in parentheses
#67: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:67:
+#define RTL8723B_TRANS_ACT_TO_CARDEMU \
--
ERROR: Macros with complex values should be enclosed in parentheses
#80: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:80:
+#define RTL8723B_TRANS_CARDEMU_TO_SUS \
--
ERROR: Macros with complex values should be enclosed in parentheses
#91: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:91:
+#define RTL8723B_TRANS_SUS_TO_CARDEMU \
--
ERROR: Macros with complex values should be enclosed in parentheses
#100: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:100:
+#define RTL8723B_TRANS_CARDEMU_TO_CARDDIS \
--
ERROR: Macros with complex values should be enclosed in parentheses
#111: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:111:
+#define RTL8723B_TRANS_CARDDIS_TO_CARDEMU \
--
ERROR: Macros with complex values should be enclosed in parentheses
#123: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:123:
+#define RTL8723B_TRANS_CARDEMU_TO_PDN \
--
ERROR: Macros with complex values should be enclosed in parentheses
#136: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:136:
+#define RTL8723B_TRANS_ACT_TO_LPS \
--
ERROR: Macros with complex values should be enclosed in parentheses
#154: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:154:
+#define RTL8723B_TRANS_LPS_TO_ACT \
--
ERROR: Macros with complex values should be enclosed in parentheses
#170: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:170:
+ #define RTL8723B_TRANS_ACT_TO_SWLPS \
--
ERROR: Macros with complex values should be enclosed in parentheses
#197: FILE: drivers/staging/rtl8723bs/include/hal_pwr_seq.h:197:
+#define RTL8723B_TRANS_SWLPS_TO_ACT \
--
I counld't put braces for they are meant to be expanded inside an
array definition
ERROR: Macros with complex values should be enclosed in parentheses
#108: FILE: drivers/staging/rtl8723bs/include/osdep_service_linux.h:108:
+#define FUNC_NDEV_ARG(ndev) __func__, ndev->name
--
ERROR: Macros with complex values should be enclosed in parentheses
#110: FILE: drivers/staging/rtl8723bs/include/osdep_service_linux.h:110:
+#define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->nam
All those macros are not used to generate expressions but arguments of
a functions.
If someone knows how to silence those errors as well,
please tell me.
Fabio Aiuto (15):
staging: rtl8723bs: inlcude macros in a do..while loop in
core/rtw_security.c
staging: rtl8723bs: put parentheses on macros with complex values in
hal/HalBtcOutSrc.h
staging: rtl8723bs: put parentheses on macros with complex values in
hal/odm_debug.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/basic_types.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/drv_types.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/hal_com.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/hal_com_reg.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/hal_data.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/hal_phy.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/ieee80211.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/rtw_debug.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/rtw_pwrctrl.h
staging: rtl8723bs: add spaces around operator in
include/rtw_pwrctrl.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/sta_info.h
staging: rtl8723bs: put parentheses on macros with complex values in
include/wifi.h
drivers/staging/rtl8723bs/core/rtw_security.c | 94 +++++++++++--------
drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 6 +-
drivers/staging/rtl8723bs/hal/odm_debug.h | 6 +-
.../staging/rtl8723bs/include/basic_types.h | 30 +++---
drivers/staging/rtl8723bs/include/drv_types.h | 4 +-
drivers/staging/rtl8723bs/include/hal_com.h | 8 +-
.../staging/rtl8723bs/include/hal_com_reg.h | 14 +--
drivers/staging/rtl8723bs/include/hal_data.h | 6 +-
drivers/staging/rtl8723bs/include/hal_phy.h | 2 +-
drivers/staging/rtl8723bs/include/ieee80211.h | 4 +-
drivers/staging/rtl8723bs/include/rtw_debug.h | 28 +++---
.../staging/rtl8723bs/include/rtw_pwrctrl.h | 6 +-
drivers/staging/rtl8723bs/include/sta_info.h | 12 +--
drivers/staging/rtl8723bs/include/wifi.h | 38 ++++----
14 files changed, 140 insertions(+), 118 deletions(-)
--
2.20.1
fix the following checkpatch warning:
ERROR: Macros with complex values should be enclosed in parentheses
152: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:152:
+#define BTC_PRINT(dbgtype, dbgflag, printstr) \
no_printk printstr
--
ERROR: Macros with complex values should be enclosed in parentheses
153: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:153:
+#define BTC_PRINT_F(dbgtype, dbgflag, printstr) \
no_printk printstr
--
ERROR: Macros with complex values should be enclosed in parentheses
154: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:154:
+#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) \
no_printk printstr
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
index 10c021024b24..1926a1f7a7e5 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
+++ b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
@@ -149,9 +149,9 @@ extern u32 GLBtcDbgType[];
}
#else
-#define BTC_PRINT(dbgtype, dbgflag, printstr) no_printk printstr
-#define BTC_PRINT_F(dbgtype, dbgflag, printstr) no_printk printstr
-#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) no_printk printstr
+#define BTC_PRINT(dbgtype, dbgflag, printstr) (no_printk printstr)
+#define BTC_PRINT_F(dbgtype, dbgflag, printstr) (no_printk printstr)
+#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) (no_printk printstr)
#define BTC_PRINT_DATA(dbgtype, dbgflag, _TitleString, _HexData, _HexDataLen) \
no_printk("%s %p %zu", _TitleString, _HexData, _HexDataLen)
#endif
--
2.20.1
fix the following checkpatch warning:
ERROR: Macros with complex values should be enclosed in parentheses
279: FILE: drivers/staging/rtl8723bs/include/drv_types.h:279:
+#define KEY_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1],
((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/drv_types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h
index 1658450b386e..ead4cb9c1e5a 100644
--- a/drivers/staging/rtl8723bs/include/drv_types.h
+++ b/drivers/staging/rtl8723bs/include/drv_types.h
@@ -276,9 +276,9 @@ struct cam_entry_cache {
};
#define KEY_FMT "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
-#define KEY_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \
+#define KEY_ARG(x) (((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \
((u8 *)(x))[6], ((u8 *)(x))[7], ((u8 *)(x))[8], ((u8 *)(x))[9], ((u8 *)(x))[10], ((u8 *)(x))[11], \
- ((u8 *)(x))[12], ((u8 *)(x))[13], ((u8 *)(x))[14], ((u8 *)(x))[15]
+ ((u8 *)(x))[12], ((u8 *)(x))[13], ((u8 *)(x))[14], ((u8 *)(x))[15])
struct dvobj_priv {
/*-------- below is common data --------*/
--
2.20.1
fix the following checkpatch warnings:
ERROR: Macros with complex values should be enclosed in parentheses
49: FILE: drivers/staging/rtl8723bs/include/hal_data.h:49:
+#define CHANNEL_MAX_NUMBER
14+24+21 /* 14 is the max channel number */
--
ERROR: Macros with complex values should be enclosed in parentheses
53: FILE: drivers/staging/rtl8723bs/include/hal_data.h:53:
+#define CHANNEL_GROUP_MAX
3+9 /* ch1~3, ch4~9, ch10~14 total three groups */
--
ERROR: Macros with complex values should be enclosed in parentheses
76: FILE: drivers/staging/rtl8723bs/include/hal_data.h:76:
+#define IQK_Matrix_Settings_NUM_92D 1+24+21
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/hal_data.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h b/drivers/staging/rtl8723bs/include/hal_data.h
index b5a0be35a6ce..2f73540dd738 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -46,11 +46,11 @@ enum rt_ampdu_burst {
RT_AMPDU_BURST_8723B = 7,
};
-#define CHANNEL_MAX_NUMBER 14+24+21 /* 14 is the max channel number */
+#define CHANNEL_MAX_NUMBER (14+24+21) /* 14 is the max channel number */
#define CHANNEL_MAX_NUMBER_2G 14
#define CHANNEL_MAX_NUMBER_5G 54 /* Please refer to "phy_GetChnlGroup8812A" and "Hal_ReadTxPowerInfo8812A" */
#define CHANNEL_MAX_NUMBER_5G_80M 7
-#define CHANNEL_GROUP_MAX 3+9 /* ch1~3, ch4~9, ch10~14 total three groups */
+#define CHANNEL_GROUP_MAX (3+9) /* ch1~3, ch4~9, ch10~14 total three groups */
#define MAX_PG_GROUP 13
/* Tx Power Limit Table Size */
@@ -73,7 +73,7 @@ enum rt_ampdu_burst {
#define IQK_BB_REG_NUM_92D 10
#define IQK_BB_REG_NUM_test 6
-#define IQK_Matrix_Settings_NUM_92D 1+24+21
+#define IQK_Matrix_Settings_NUM_92D (1+24+21)
/* define HP_THERMAL_NUM 8 */
/* duplicate code, will move to ODM ######### */
--
2.20.1
fix the following checkpatch warning:
ERROR: Macros with complex values should be enclosed in parentheses
27: FILE: drivers/staging/rtl8723bs/include/hal_phy.h:27:
+#define RF6052_MAX_REG \
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/hal_phy.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/include/hal_phy.h b/drivers/staging/rtl8723bs/include/hal_phy.h
index 90bb5d784674..5aec04f705b1 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy.h
@@ -25,7 +25,7 @@
#define RF6052_MAX_REG_92C 0x7F
#define RF6052_MAX_REG \
- (RF6052_MAX_REG_88E > RF6052_MAX_REG_92C) ? RF6052_MAX_REG_88E : RF6052_MAX_REG_92C
+ ((RF6052_MAX_REG_88E > RF6052_MAX_REG_92C) ? RF6052_MAX_REG_88E : RF6052_MAX_REG_92C)
#define GET_RF6052_REAL_MAX_REG(_Adapter) RF6052_MAX_REG_92C
--
2.20.1
fix the following checkpatch warning:
ERROR: Macros with complex values should be enclosed in parentheses
823: FILE: drivers/staging/rtl8723bs/include/ieee80211.h:823:
+#define CHAN_ARG(channel) \
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/ieee80211.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h
index 8a10bca876b8..80df24c1c6ed 100644
--- a/drivers/staging/rtl8723bs/include/ieee80211.h
+++ b/drivers/staging/rtl8723bs/include/ieee80211.h
@@ -823,8 +823,8 @@ struct rtw_ieee80211_channel {
#define CHAN_ARG(channel) \
/*(channel)->band*/ \
/*, (channel)->center_freq*/ \
- (channel)->hw_value \
- , (channel)->flags \
+ ((channel)->hw_value \
+ , (channel)->flags) \
/*, (channel)->max_antenna_gain*/ \
/*, (channel)->max_power*/ \
/*, (channel)->max_reg_power*/ \
--
2.20.1
fix the following checkpatch warnings:
ERROR: Macros with complex values should be enclosed in parentheses
92: FILE: drivers/staging/rtl8723bs/include/rtw_pwrctrl.h:92:
+#define LPS_DELAY_TIME 1*HZ /* 1 sec */
--
ERROR: Macros with complex values should be enclosed in parentheses
241: FILE: drivers/staging/rtl8723bs/include/rtw_pwrctrl.h:241:
+#define rtw_get_ips_mode_req(pwrctl) \
--
ERROR: Macros with complex values should be enclosed in parentheses
244: FILE: drivers/staging/rtl8723bs/include/rtw_pwrctrl.h:244:
+#define rtw_ips_mode_req(pwrctl, ips_mode) \
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
index cec9fc0cf794..688436cf3610 100644
--- a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
@@ -89,7 +89,7 @@ struct reportpwrstate_parm {
unsigned short rsvd;
};
-#define LPS_DELAY_TIME 1*HZ /* 1 sec */
+#define LPS_DELAY_TIME (1*HZ) /* 1 sec */
#define EXE_PWR_NONE 0x01
#define EXE_PWR_IPS 0x02
@@ -239,10 +239,10 @@ struct pwrctrl_priv {
};
#define rtw_get_ips_mode_req(pwrctl) \
- (pwrctl)->ips_mode_req
+ ((pwrctl)->ips_mode_req)
#define rtw_ips_mode_req(pwrctl, ips_mode) \
- (pwrctl)->ips_mode_req = (ips_mode)
+ ((pwrctl)->ips_mode_req = (ips_mode))
#define RTW_PWR_STATE_CHK_INTERVAL 2000
--
2.20.1
fix the following checkpatch warnings:
ERROR: Macros with complex values should be enclosed in parentheses
114: FILE: drivers/staging/rtl8723bs/include/wifi.h:114:
+#define SetToDs(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
119: FILE: drivers/staging/rtl8723bs/include/wifi.h:119:
+#define ClearToDs(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
122: FILE: drivers/staging/rtl8723bs/include/wifi.h:122:
+#define SetFrDs(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
127: FILE: drivers/staging/rtl8723bs/include/wifi.h:127:
+#define ClearFrDs(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
132: FILE: drivers/staging/rtl8723bs/include/wifi.h:132:
+#define SetMFrag(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
137: FILE: drivers/staging/rtl8723bs/include/wifi.h:137:
+#define ClearMFrag(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
140: FILE: drivers/staging/rtl8723bs/include/wifi.h:140:
+#define SetRetry(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
145: FILE: drivers/staging/rtl8723bs/include/wifi.h:145:
+#define ClearRetry(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
148: FILE: drivers/staging/rtl8723bs/include/wifi.h:148:
+#define SetPwrMgt(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
153: FILE: drivers/staging/rtl8723bs/include/wifi.h:153:
+#define ClearPwrMgt(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
156: FILE: drivers/staging/rtl8723bs/include/wifi.h:156:
+#define SetMData(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
161: FILE: drivers/staging/rtl8723bs/include/wifi.h:161:
+#define ClearMData(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
164: FILE: drivers/staging/rtl8723bs/include/wifi.h:164:
+#define SetPrivacy(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
170: FILE: drivers/staging/rtl8723bs/include/wifi.h:170:
+#define ClearPrivacy(pbuf) \
--
ERROR: Macros with complex values should be enclosed in parentheses
220: FILE: drivers/staging/rtl8723bs/include/wifi.h:220:
+#define SetDuration(pbuf, dur) \
--
ERROR: Macros with complex values should be enclosed in parentheses
224: FILE: drivers/staging/rtl8723bs/include/wifi.h:224:
+#define SetPriority(pbuf, tid) \
--
ERROR: Macros with complex values should be enclosed in parentheses
229: FILE: drivers/staging/rtl8723bs/include/wifi.h:229:
+#define SetEOSP(pbuf, eosp) \
--
ERROR: Macros with complex values should be enclosed in parentheses
232: FILE: drivers/staging/rtl8723bs/include/wifi.h:232:
+#define SetAckpolicy(pbuf, ack) \
--
ERROR: Macros with complex values should be enclosed in parentheses
239: FILE: drivers/staging/rtl8723bs/include/wifi.h:239:
+#define SetAMsdu(pbuf, amsdu) \
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/wifi.h | 38 ++++++++++++------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/wifi.h b/drivers/staging/rtl8723bs/include/wifi.h
index efef549bf811..a9f24fc2bf2f 100644
--- a/drivers/staging/rtl8723bs/include/wifi.h
+++ b/drivers/staging/rtl8723bs/include/wifi.h
@@ -112,63 +112,63 @@ enum wifi_reg_domain {
#define _ORDER_ BIT(15)
#define SetToDs(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_))
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
#define ClearToDs(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_))
+ (*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_)))
#define SetFrDs(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_))
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
#define ClearFrDs(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_))
+ (*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)))
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
#define SetMFrag(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_))
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
#define ClearMFrag(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
+ (*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)))
#define SetRetry(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_))
#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
#define ClearRetry(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
+ (*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_)))
#define SetPwrMgt(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_))
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
#define ClearPwrMgt(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
+ (*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)))
#define SetMData(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_))
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
#define ClearMData(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
+ (*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)))
#define SetPrivacy(pbuf) \
- *(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_))
#define GetPrivacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
#define ClearPrivacy(pbuf) \
- *(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_))
+ (*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)))
#define GetOrder(pbuf) \
@@ -218,26 +218,26 @@ enum wifi_reg_domain {
} while (0)
#define SetDuration(pbuf, dur) \
- *(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
+ (*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)))
#define SetPriority(pbuf, tid) \
- *(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
+ (*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf))
#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
#define SetEOSP(pbuf, eosp) \
- *(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
+ (*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4))
#define SetAckpolicy(pbuf, ack) \
- *(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
+ (*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5))
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
#define GetAMsdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
#define SetAMsdu(pbuf, amsdu) \
- *(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7)
+ (*(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7))
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
--
2.20.1
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 <[email protected]>
---
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
fix the following checkpatch warnings:
ERROR: Macros with complex values should be enclosed in parentheses
710: FILE: drivers/staging/rtl8723bs/include/hal_com_reg.h:710:
+#define RATE_ALL_CCK
RATR_1M | RATR_2M | RATR_55M | RATR_11M
--
ERROR: Macros with complex values should be enclosed in parentheses
711: FILE: drivers/staging/rtl8723bs/include/hal_com_reg.h:711:
+#define RATE_ALL_OFDM_AG
RATR_6M | RATR_9M | RATR_12M | RATR_18M | RATR_24M |\
--
ERROR: Macros with complex values should be enclosed in parentheses
713: FILE: drivers/staging/rtl8723bs/include/hal_com_reg.h:713:
+#define RATE_ALL_OFDM_1SS
RATR_MCS0 | RATR_MCS1 | RATR_MCS2 | RATR_MCS3 |\
--
ERROR: Macros with complex values should be enclosed in parentheses
715: FILE: drivers/staging/rtl8723bs/include/hal_com_reg.h:715:
+#define RATE_ALL_OFDM_2SS
RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | RATR_MCS11 |\
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/hal_com_reg.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/hal_com_reg.h b/drivers/staging/rtl8723bs/include/hal_com_reg.h
index b555826760d0..b5610dedc23e 100644
--- a/drivers/staging/rtl8723bs/include/hal_com_reg.h
+++ b/drivers/staging/rtl8723bs/include/hal_com_reg.h
@@ -707,13 +707,13 @@ Default: 00b.
/* ALL CCK Rate */
-#define RATE_ALL_CCK RATR_1M | RATR_2M | RATR_55M | RATR_11M
-#define RATE_ALL_OFDM_AG RATR_6M | RATR_9M | RATR_12M | RATR_18M | RATR_24M |\
- RATR_36M | RATR_48M | RATR_54M
-#define RATE_ALL_OFDM_1SS RATR_MCS0 | RATR_MCS1 | RATR_MCS2 | RATR_MCS3 |\
- RATR_MCS4 | RATR_MCS5 | RATR_MCS6 | RATR_MCS7
-#define RATE_ALL_OFDM_2SS RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | RATR_MCS11 |\
- RATR_MCS12 | RATR_MCS13 | RATR_MCS14 | RATR_MCS15
+#define RATE_ALL_CCK (RATR_1M | RATR_2M | RATR_55M | RATR_11M)
+#define RATE_ALL_OFDM_AG (RATR_6M | RATR_9M | RATR_12M | RATR_18M | RATR_24M |\
+ RATR_36M | RATR_48M | RATR_54M)
+#define RATE_ALL_OFDM_1SS (RATR_MCS0 | RATR_MCS1 | RATR_MCS2 | RATR_MCS3 |\
+ RATR_MCS4 | RATR_MCS5 | RATR_MCS6 | RATR_MCS7)
+#define RATE_ALL_OFDM_2SS (RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | RATR_MCS11 |\
+ RATR_MCS12 | RATR_MCS13 | RATR_MCS14 | RATR_MCS15)
#define RATE_BITMAP_ALL 0xFFFFF
--
2.20.1
fix the following checkpatch warning:
ERROR: Macros starting with if should be enclosed by a
do - while loop to avoid possible if/else logic defects
+ #define RT_PRINT_DATA(_Comp, _Level,
_TitleString, _HexData, _HexDataLen) \
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_debug.h | 28 ++++++++++---------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/rtw_debug.h b/drivers/staging/rtl8723bs/include/rtw_debug.h
index d1c557818305..b00f8a6c4312 100644
--- a/drivers/staging/rtl8723bs/include/rtw_debug.h
+++ b/drivers/staging/rtl8723bs/include/rtw_debug.h
@@ -236,19 +236,21 @@
#if defined(_dbgdump)
#undef RT_PRINT_DATA
#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) \
- if (((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
- { \
- int __i; \
- u8 *ptr = (u8 *)_HexData; \
- _dbgdump("%s", DRIVER_PREFIX); \
- _dbgdump(_TitleString); \
- for (__i = 0; __i < (int)_HexDataLen; __i++) \
- { \
- _dbgdump("%02X%s", ptr[__i], (((__i + 1) % 4) == 0)?" ":" "); \
- if (((__i + 1) % 16) == 0) _dbgdump("\n"); \
- } \
- _dbgdump("\n"); \
- }
+ do { \
+ if (((_Comp) & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) \
+ { \
+ int __i; \
+ u8 *ptr = (u8 *)_HexData; \
+ _dbgdump("%s", DRIVER_PREFIX); \
+ _dbgdump(_TitleString); \
+ for (__i = 0; __i < (int)_HexDataLen; __i++) \
+ { \
+ _dbgdump("%02X%s", ptr[__i], (((__i + 1) % 4) == 0)?" ":" "); \
+ if (((__i + 1) % 16) == 0) _dbgdump("\n"); \
+ } \
+ _dbgdump("\n"); \
+ } \
+ } while (0)
#endif /* defined(_dbgdump) */
#endif /* DEBUG_RTL871X */
--
2.20.1
fix post-commit hook checkpatch warning:
add a space around that '*'
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
index 688436cf3610..88e66211e0e3 100644
--- a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
@@ -89,7 +89,7 @@ struct reportpwrstate_parm {
unsigned short rsvd;
};
-#define LPS_DELAY_TIME (1*HZ) /* 1 sec */
+#define LPS_DELAY_TIME (1 * HZ) /* 1 sec */
#define EXE_PWR_NONE 0x01
#define EXE_PWR_IPS 0x02
--
2.20.1
fix the following checkpatch warnings:
ERROR: Macros with complex values should be enclosed in parentheses
284: FILE: drivers/staging/rtl8723bs/include/sta_info.h:284:
+#define STA_RX_PKTS_ARG(sta) \
--
ERROR: Macros with complex values should be enclosed in parentheses
289: FILE: drivers/staging/rtl8723bs/include/sta_info.h:289:
+#define STA_LAST_RX_PKTS_ARG(sta) \
--
ERROR: Macros with complex values should be enclosed in parentheses
294: FILE: drivers/staging/rtl8723bs/include/sta_info.h:294:
+#define STA_RX_PKTS_DIFF_ARG(sta) \
Signed-off-by: Fabio Aiuto <[email protected]>
---
drivers/staging/rtl8723bs/include/sta_info.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/sta_info.h b/drivers/staging/rtl8723bs/include/sta_info.h
index abde3e3df988..1cdf93ec3b66 100644
--- a/drivers/staging/rtl8723bs/include/sta_info.h
+++ b/drivers/staging/rtl8723bs/include/sta_info.h
@@ -282,19 +282,19 @@ struct sta_info {
} while (0)
#define STA_RX_PKTS_ARG(sta) \
- sta->sta_stats.rx_mgnt_pkts \
+ (sta->sta_stats.rx_mgnt_pkts \
, sta->sta_stats.rx_ctrl_pkts \
- , sta->sta_stats.rx_data_pkts
+ , sta->sta_stats.rx_data_pkts)
#define STA_LAST_RX_PKTS_ARG(sta) \
- sta->sta_stats.last_rx_mgnt_pkts \
+ (sta->sta_stats.last_rx_mgnt_pkts \
, sta->sta_stats.last_rx_ctrl_pkts \
- , sta->sta_stats.last_rx_data_pkts
+ , sta->sta_stats.last_rx_data_pkts)
#define STA_RX_PKTS_DIFF_ARG(sta) \
- sta->sta_stats.rx_mgnt_pkts - sta->sta_stats.last_rx_mgnt_pkts \
+ (sta->sta_stats.rx_mgnt_pkts - sta->sta_stats.last_rx_mgnt_pkts \
, sta->sta_stats.rx_ctrl_pkts - sta->sta_stats.last_rx_ctrl_pkts \
- , sta->sta_stats.rx_data_pkts - sta->sta_stats.last_rx_data_pkts
+ , sta->sta_stats.rx_data_pkts - sta->sta_stats.last_rx_data_pkts)
#define STA_PKTS_FMT "(m:%llu, c:%llu, d:%llu)"
--
2.20.1
On Fri, Mar 26, 2021 at 10:09:09AM +0100, Fabio Aiuto wrote:
> fix the following checkpatch warning:
>
> ERROR: Macros with complex values should be enclosed in parentheses
> 152: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:152:
> +#define BTC_PRINT(dbgtype, dbgflag, printstr) \
> no_printk printstr
> --
> ERROR: Macros with complex values should be enclosed in parentheses
> 153: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:153:
> +#define BTC_PRINT_F(dbgtype, dbgflag, printstr) \
> no_printk printstr
> --
> ERROR: Macros with complex values should be enclosed in parentheses
> 154: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:154:
> +#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) \
> no_printk printstr
>
> Signed-off-by: Fabio Aiuto <[email protected]>
> ---
> drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
> index 10c021024b24..1926a1f7a7e5 100644
> --- a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
> +++ b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
> @@ -149,9 +149,9 @@ extern u32 GLBtcDbgType[];
> }
>
> #else
> -#define BTC_PRINT(dbgtype, dbgflag, printstr) no_printk printstr
> -#define BTC_PRINT_F(dbgtype, dbgflag, printstr) no_printk printstr
> -#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) no_printk printstr
> +#define BTC_PRINT(dbgtype, dbgflag, printstr) (no_printk printstr)
> +#define BTC_PRINT_F(dbgtype, dbgflag, printstr) (no_printk printstr)
> +#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) (no_printk printstr)
This makes no sense at all. no_printk is a function. The BTC_PRINT()
macros are super ugly and this only makes it worse.
regards,
dan carpenter
On Fri, Mar 26, 2021 at 12:54:49PM +0300, Dan Carpenter wrote:
> On Fri, Mar 26, 2021 at 10:09:09AM +0100, Fabio Aiuto wrote:
> > fix the following checkpatch warning:
> >
> > ERROR: Macros with complex values should be enclosed in parentheses
> > 152: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:152:
> > +#define BTC_PRINT(dbgtype, dbgflag, printstr) \
> > no_printk printstr
> > --
> > ERROR: Macros with complex values should be enclosed in parentheses
> > 153: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:153:
> > +#define BTC_PRINT_F(dbgtype, dbgflag, printstr) \
> > no_printk printstr
> > --
> > ERROR: Macros with complex values should be enclosed in parentheses
> > 154: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:154:
> > +#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) \
> > no_printk printstr
> >
> > Signed-off-by: Fabio Aiuto <[email protected]>
> > ---
> > drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
> > index 10c021024b24..1926a1f7a7e5 100644
> > --- a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
> > +++ b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
> > @@ -149,9 +149,9 @@ extern u32 GLBtcDbgType[];
> > }
> >
> > #else
> > -#define BTC_PRINT(dbgtype, dbgflag, printstr) no_printk printstr
> > -#define BTC_PRINT_F(dbgtype, dbgflag, printstr) no_printk printstr
> > -#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) no_printk printstr
> > +#define BTC_PRINT(dbgtype, dbgflag, printstr) (no_printk printstr)
> > +#define BTC_PRINT_F(dbgtype, dbgflag, printstr) (no_printk printstr)
> > +#define BTC_PRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) (no_printk printstr)
>
> This makes no sense at all. no_printk is a function. The BTC_PRINT()
> macros are super ugly and this only makes it worse.
>
> regards,
> dan carpenter
>
so I'll just drop the patch in the next v2
thanks,
fabio
From: Fabio Aiuto
> Sent: 26 March 2021 09:09
>
> fix the following checkpatch warnings:
>
> ERROR: Macros with complex values should be enclosed in parentheses
> 284: FILE: drivers/staging/rtl8723bs/include/sta_info.h:284:
> +#define STA_RX_PKTS_ARG(sta) \
> --
> ERROR: Macros with complex values should be enclosed in parentheses
> 289: FILE: drivers/staging/rtl8723bs/include/sta_info.h:289:
> +#define STA_LAST_RX_PKTS_ARG(sta) \
> --
> ERROR: Macros with complex values should be enclosed in parentheses
> 294: FILE: drivers/staging/rtl8723bs/include/sta_info.h:294:
> +#define STA_RX_PKTS_DIFF_ARG(sta) \
>
> Signed-off-by: Fabio Aiuto <[email protected]>
> ---
> drivers/staging/rtl8723bs/include/sta_info.h | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/include/sta_info.h
> b/drivers/staging/rtl8723bs/include/sta_info.h
> index abde3e3df988..1cdf93ec3b66 100644
> --- a/drivers/staging/rtl8723bs/include/sta_info.h
> +++ b/drivers/staging/rtl8723bs/include/sta_info.h
> @@ -282,19 +282,19 @@ struct sta_info {
> } while (0)
>
> #define STA_RX_PKTS_ARG(sta) \
> - sta->sta_stats.rx_mgnt_pkts \
> + (sta->sta_stats.rx_mgnt_pkts \
> , sta->sta_stats.rx_ctrl_pkts \
> - , sta->sta_stats.rx_data_pkts
> + , sta->sta_stats.rx_data_pkts)
That doesn't look right at all.
You've changed what is (probably) a list of arguments to a function
into a comma operator list.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
On Fri, Mar 26, 2021 at 01:39:24PM +0000, David Laight wrote:
> From: Fabio Aiuto
> > Sent: 26 March 2021 09:09
> >
> > fix the following checkpatch warnings:
> >
> > ERROR: Macros with complex values should be enclosed in parentheses
> > 284: FILE: drivers/staging/rtl8723bs/include/sta_info.h:284:
> > +#define STA_RX_PKTS_ARG(sta) \
> > --
> > ERROR: Macros with complex values should be enclosed in parentheses
> > 289: FILE: drivers/staging/rtl8723bs/include/sta_info.h:289:
> > +#define STA_LAST_RX_PKTS_ARG(sta) \
> > --
> > ERROR: Macros with complex values should be enclosed in parentheses
> > 294: FILE: drivers/staging/rtl8723bs/include/sta_info.h:294:
> > +#define STA_RX_PKTS_DIFF_ARG(sta) \
> >
> > Signed-off-by: Fabio Aiuto <[email protected]>
> > ---
> > drivers/staging/rtl8723bs/include/sta_info.h | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/include/sta_info.h
> > b/drivers/staging/rtl8723bs/include/sta_info.h
> > index abde3e3df988..1cdf93ec3b66 100644
> > --- a/drivers/staging/rtl8723bs/include/sta_info.h
> > +++ b/drivers/staging/rtl8723bs/include/sta_info.h
> > @@ -282,19 +282,19 @@ struct sta_info {
> > } while (0)
> >
> > #define STA_RX_PKTS_ARG(sta) \
> > - sta->sta_stats.rx_mgnt_pkts \
> > + (sta->sta_stats.rx_mgnt_pkts \
> > , sta->sta_stats.rx_ctrl_pkts \
> > - , sta->sta_stats.rx_data_pkts
> > + , sta->sta_stats.rx_data_pkts)
>
> That doesn't look right at all.
> You've changed what is (probably) a list of arguments to a function
> into a comma operator list.
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
ops, you're right David, thank you and sorry to all
for noise.
fabio
On Fri, Mar 26, 2021 at 10:09:12AM +0100, Fabio Aiuto wrote:
> fix the following checkpatch warning:
>
> ERROR: Macros with complex values should be enclosed in parentheses
> 279: FILE: drivers/staging/rtl8723bs/include/drv_types.h:279:
> +#define KEY_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1],
> ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \
>
> Signed-off-by: Fabio Aiuto <[email protected]>
> ---
> drivers/staging/rtl8723bs/include/drv_types.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h
> index 1658450b386e..ead4cb9c1e5a 100644
> --- a/drivers/staging/rtl8723bs/include/drv_types.h
> +++ b/drivers/staging/rtl8723bs/include/drv_types.h
> @@ -276,9 +276,9 @@ struct cam_entry_cache {
> };
>
> #define KEY_FMT "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
> -#define KEY_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \
> +#define KEY_ARG(x) (((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \
> ((u8 *)(x))[6], ((u8 *)(x))[7], ((u8 *)(x))[8], ((u8 *)(x))[9], ((u8 *)(x))[10], ((u8 *)(x))[11], \
> - ((u8 *)(x))[12], ((u8 *)(x))[13], ((u8 *)(x))[14], ((u8 *)(x))[15]
> + ((u8 *)(x))[12], ((u8 *)(x))[13], ((u8 *)(x))[14], ((u8 *)(x))[15])
KEY_ARG() isn't used anywhere that I can see. Just delete it.
Please take your time when you re-write this series and think about each
change clearly and fix the underlying badness instead of just making
checkpatch happy. I would really just throw out the patchset and start
over from scratch.
regards,
dan carpenter
On Fri, Mar 26, 2021 at 05:22:57PM +0300, Dan Carpenter wrote:
> On Fri, Mar 26, 2021 at 10:09:12AM +0100, Fabio Aiuto wrote:
> > fix the following checkpatch warning:
> >
> > ERROR: Macros with complex values should be enclosed in parentheses
> > 279: FILE: drivers/staging/rtl8723bs/include/drv_types.h:279:
> > +#define KEY_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1],
> > ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \
> >
> > Signed-off-by: Fabio Aiuto <[email protected]>
> > ---
> > drivers/staging/rtl8723bs/include/drv_types.h | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h
> > index 1658450b386e..ead4cb9c1e5a 100644
> > --- a/drivers/staging/rtl8723bs/include/drv_types.h
> > +++ b/drivers/staging/rtl8723bs/include/drv_types.h
> > @@ -276,9 +276,9 @@ struct cam_entry_cache {
> > };
> >
> > #define KEY_FMT "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
> > -#define KEY_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \
> > +#define KEY_ARG(x) (((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5], \
> > ((u8 *)(x))[6], ((u8 *)(x))[7], ((u8 *)(x))[8], ((u8 *)(x))[9], ((u8 *)(x))[10], ((u8 *)(x))[11], \
> > - ((u8 *)(x))[12], ((u8 *)(x))[13], ((u8 *)(x))[14], ((u8 *)(x))[15]
> > + ((u8 *)(x))[12], ((u8 *)(x))[13], ((u8 *)(x))[14], ((u8 *)(x))[15])
>
> KEY_ARG() isn't used anywhere that I can see. Just delete it.
>
> Please take your time when you re-write this series and think about each
> change clearly and fix the underlying badness instead of just making
> checkpatch happy. I would really just throw out the patchset and start
> over from scratch.
>
> regards,
> dan carpenter
>
Hi Dan,
KEY_FMT is unused as well. I'm rewriting the whole series, will send
v2.
thank you,
fabio