automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Subject: [dpdk-test-report] |WARNING| pw57843 [PATCH 02/22] net/hns3: add some definitions for data structure and macro
Date: Fri, 23 Aug 2019 15:50:59 +0200 (CEST)	[thread overview]
Message-ID: <20190823135059.2116F1BFDB@dpdk.org> (raw)
In-Reply-To: <1566568031-45991-3-git-send-email-xavier.huwei@huawei.com>

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

           reply	other threads:[~2019-08-23 13:51 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1566568031-45991-3-git-send-email-xavier.huwei@huawei.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190823135059.2116F1BFDB@dpdk.org \
    --to=checkpatch@dpdk.org \
    --cc=test-report@dpdk.org \
    --cc=xavier.huwei@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).