[dpdk-dev] [PATCH v5 1/5] net/hinic/base: fix code style check issue

Xiaoyun wang cloud.wangxiaoyun at huawei.com
Fri Nov 1 14:36:42 CET 2019


This patch fixs the code style check issue for MACRO_ARG_REUSE.

Fixes: b8582d051af1 ("net/hinic/base: add HW interfaces for SR-IOV")
Signed-off-by: Xiaoyun wang <cloud.wangxiaoyun at huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_mbox.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.c b/drivers/net/hinic/base/hinic_pmd_mbox.c
index bdb94e9..3d3c1bc 100644
--- a/drivers/net/hinic/base/hinic_pmd_mbox.c
+++ b/drivers/net/hinic/base/hinic_pmd_mbox.c
@@ -131,11 +131,9 @@ enum hinic_mbox_tx_status {
 #define MBOX_RESPONSE_ERROR		0x1
 #define MBOX_MSG_ID_MASK		0xFF
 #define MBOX_MSG_ID(func_to_func)	((func_to_func)->send_msg_id)
-#define MBOX_MSG_ID_INC(func_to_func)	(MBOX_MSG_ID(func_to_func) =	\
-			(MBOX_MSG_ID(func_to_func) + 1) & MBOX_MSG_ID_MASK)
 
 enum hinic_hwif_direction_type {
-	/* driver send msg to up or up send msg to drier*/
+	/* driver send msg to up or up send msg to driver*/
 	HINIC_HWIF_DIRECT_SEND = 0,
 	/* after driver/up send msg to each other, then up/driver ack the msg */
 	HINIC_HWIF_RESPONSE,
@@ -690,7 +688,8 @@ static int hinic_mbox_to_func(struct hinic_mbox_func_to_func *func_to_func,
 	if (err)
 		return err;
 
-	msg_info.msg_id = MBOX_MSG_ID_INC(func_to_func);
+	msg_info.msg_id = (MBOX_MSG_ID(func_to_func) + 1) & MBOX_MSG_ID_MASK;
+	MBOX_MSG_ID(func_to_func) = msg_info.msg_id;
 
 	set_mbox_to_func_event(func_to_func, EVENT_START);
 
-- 
1.8.3.1



More information about the dev mailing list