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 B40BAA046B for ; Fri, 23 Aug 2019 15:51:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 41E201BFBD; Fri, 23 Aug 2019 15:51:00 +0200 (CEST) Received: by dpdk.org (Postfix, from userid 1017) id 2116F1BFDB; Fri, 23 Aug 2019 15:50:59 +0200 (CEST) In-Reply-To: <1566568031-45991-3-git-send-email-xavier.huwei@huawei.com> References: <1566568031-45991-3-git-send-email-xavier.huwei@huawei.com> To: test-report@dpdk.org Cc: "Wei Hu (Xavier)" Message-Id: <20190823135059.2116F1BFDB@dpdk.org> Date: Fri, 23 Aug 2019 15:50:59 +0200 (CEST) From: checkpatch@dpdk.org Subject: [dpdk-test-report] |WARNING| pw57843 [PATCH 02/22] net/hns3: add some definitions for data structure and macro X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Sender: "test-report" Test-Label: checkpatch Test-Status: WARNING http://dpdk.org/patch/57843 _coding style issues_ CHECK:MACRO_ARG_REUSE: Macro argument reuse 'hw' - possible side-effects? #532: FILE: drivers/net/hns3/hns3_ethdev.h:496: +#define HNS3_DEV_HW_TO_ADAPTER(hw) \ + container_of(hw, struct hns3_adapter, hw) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'origin' - possible side-effects? #535: FILE: drivers/net/hns3/hns3_ethdev.h:499: +#define hns3_set_field(origin, mask, shift, val) \ + do { \ + (origin) &= (~(mask)); \ + (origin) |= ((val) << (shift)) & (mask); \ + } while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'mask' - possible side-effects? #535: FILE: drivers/net/hns3/hns3_ethdev.h:499: +#define hns3_set_field(origin, mask, shift, val) \ + do { \ + (origin) &= (~(mask)); \ + (origin) |= ((val) << (shift)) & (mask); \ + } while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'shift' - possible side-effects? #542: FILE: drivers/net/hns3/hns3_ethdev.h:506: +#define hns3_set_bit(origin, shift, val) \ + hns3_set_field((origin), (0x1UL << (shift)), (shift), (val)) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'shift' - possible side-effects? #544: FILE: drivers/net/hns3/hns3_ethdev.h:508: +#define hns3_get_bit(origin, shift) \ + hns3_get_field((origin), (0x1UL << (shift)), (shift)) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'y' - possible side-effects? #564: FILE: drivers/net/hns3/hns3_ethdev.h:528: +#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects? #565: FILE: drivers/net/hns3/hns3_ethdev.h:529: +#define rounddown(x, y) ((x) - ((x) % (y))) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'd' - possible side-effects? #567: FILE: drivers/net/hns3/hns3_ethdev.h:531: +#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects? #590: FILE: drivers/net/hns3/hns3_ethdev.h:554: +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'act' - possible side-effects? #592: FILE: drivers/net/hns3/hns3_ethdev.h:556: +#define NEXT_ITEM_OF_ACTION(act, actions, index) \ + do { \ + act = (actions) + (index); \ + while (act->type == RTE_FLOW_ACTION_TYPE_VOID) { \ + (index)++; \ + act = actions + index; \ + } \ + } while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'actions' - possible side-effects? #592: FILE: drivers/net/hns3/hns3_ethdev.h:556: +#define NEXT_ITEM_OF_ACTION(act, actions, index) \ + do { \ + act = (actions) + (index); \ + while (act->type == RTE_FLOW_ACTION_TYPE_VOID) { \ + (index)++; \ + act = actions + index; \ + } \ + } while (0) CHECK:MACRO_ARG_REUSE: Macro argument reuse 'index' - possible side-effects? #592: FILE: drivers/net/hns3/hns3_ethdev.h:556: +#define NEXT_ITEM_OF_ACTION(act, actions, index) \ + do { \ + act = (actions) + (index); \ + while (act->type == RTE_FLOW_ACTION_TYPE_VOID) { \ + (index)++; \ + act = actions + index; \ + } \ + } while (0) total: 0 errors, 0 warnings, 12 checks, 609 lines checked