From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E4C6FA00BE; Fri, 1 Nov 2019 14:21:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB2381C1B7; Fri, 1 Nov 2019 14:21:10 +0100 (CET) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id B92A21C1AC for ; Fri, 1 Nov 2019 14:21:09 +0100 (CET) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 823DAB37478B5BFBD474 for ; Fri, 1 Nov 2019 21:21:03 +0800 (CST) Received: from tester.localdomain (10.175.119.39) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 1 Nov 2019 21:20:53 +0800 From: Xiaoyun wang To: CC: , , , , , , , Xiaoyun wang Date: Fri, 1 Nov 2019 21:36:42 +0800 Message-ID: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v5 1/5] net/hinic/base: fix code style check issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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