automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Bingbin Chen <chen.bingbin@zte.com.cn>
Subject: |WARNING| pw152514 [PATCH v6 14/14] net/zxdh: optimize msg processing ops and modify some issues
Date: Fri, 21 Mar 2025 08:53:03 +0100 (CET)	[thread overview]
Message-ID: <20250321075303.8C4BB127183@dpdk.org> (raw)
In-Reply-To: <20250321073200.2015711-15-chen.bingbin@zte.com.cn>

Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/152514

_coding style issues_


CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'fld' may be better as '(fld)' to avoid precedence issues
#146: FILE: drivers/net/zxdh/zxdh_common.h:69:
+#define __zxdh_bit_sz(typ, fld) sizeof(__zxdh_nullp(typ)->fld)

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'fld' may be better as '(fld)' to avoid precedence issues
#147: FILE: drivers/net/zxdh/zxdh_common.h:70:
+#define __zxdh_bit_off(typ, fld) ((unsigned int)(uintptr_t) \
+				  (&(__zxdh_nullp(typ)->fld)))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'typ' - possible side-effects?
#149: FILE: drivers/net/zxdh/zxdh_common.h:72:
+#define __zxdh_dw_bit_off(typ, fld) (32 - __zxdh_bit_sz(typ, fld) - \
+				    (__zxdh_bit_off(typ, fld) & 0x1f))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fld' - possible side-effects?
#149: FILE: drivers/net/zxdh/zxdh_common.h:72:
+#define __zxdh_dw_bit_off(typ, fld) (32 - __zxdh_bit_sz(typ, fld) - \
+				    (__zxdh_bit_off(typ, fld) & 0x1f))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'typ' - possible side-effects?
#153: FILE: drivers/net/zxdh/zxdh_common.h:76:
+#define __zxdh_dw_mask(typ, fld) (__zxdh_mask(typ, fld) << \
+				  __zxdh_dw_bit_off(typ, fld))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fld' - possible side-effects?
#153: FILE: drivers/net/zxdh/zxdh_common.h:76:
+#define __zxdh_dw_mask(typ, fld) (__zxdh_mask(typ, fld) << \
+				  __zxdh_dw_bit_off(typ, fld))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'typ' - possible side-effects?
#157: FILE: drivers/net/zxdh/zxdh_common.h:80:
+#define __zxdh_16_bit_off(typ, fld) (16 - __zxdh_bit_sz(typ, fld) - \
+				    (__zxdh_bit_off(typ, fld) & 0xf))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fld' - possible side-effects?
#157: FILE: drivers/net/zxdh/zxdh_common.h:80:
+#define __zxdh_16_bit_off(typ, fld) (16 - __zxdh_bit_sz(typ, fld) - \
+				    (__zxdh_bit_off(typ, fld) & 0xf))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'typ' - possible side-effects?
#160: FILE: drivers/net/zxdh/zxdh_common.h:83:
+#define __zxdh_16_mask(typ, fld) (__zxdh_mask16(typ, fld) << \
+				  __zxdh_16_bit_off(typ, fld))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fld' - possible side-effects?
#160: FILE: drivers/net/zxdh/zxdh_common.h:83:
+#define __zxdh_16_mask(typ, fld) (__zxdh_mask16(typ, fld) << \
+				  __zxdh_16_bit_off(typ, fld))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'typ' - possible side-effects?
#172: FILE: drivers/net/zxdh/zxdh_common.h:95:
+#define ZXDH_SET(typ, p, fld, v) do { \
+	BUILD_BUG_ON(__zxdh_bit_sz(typ, fld) % 8); \
+	uint32_t fld_sz = __zxdh_bit_sz(typ, fld) / 8; \
+	uint8_t *addr = ZXDH_ADDR_OF(typ, p, fld); \
+	zxdh_set_value(fld_sz, addr, v); \
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fld' - possible side-effects?
#172: FILE: drivers/net/zxdh/zxdh_common.h:95:
+#define ZXDH_SET(typ, p, fld, v) do { \
+	BUILD_BUG_ON(__zxdh_bit_sz(typ, fld) % 8); \
+	uint32_t fld_sz = __zxdh_bit_sz(typ, fld) / 8; \
+	uint8_t *addr = ZXDH_ADDR_OF(typ, p, fld); \
+	zxdh_set_value(fld_sz, addr, v); \
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'typ' - possible side-effects?
#179: FILE: drivers/net/zxdh/zxdh_common.h:102:
+#define ZXDH_GET(typ, p, fld) ({ \
+	BUILD_BUG_ON(__zxdh_bit_sz(typ, fld) % 8); \
+	uint32_t fld_sz = __zxdh_bit_sz(typ, fld) / 8; \
+	uint8_t *addr = ZXDH_ADDR_OF(typ, p, fld); \
+	zxdh_get_value(fld_sz, addr); \
+})

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fld' - possible side-effects?
#179: FILE: drivers/net/zxdh/zxdh_common.h:102:
+#define ZXDH_GET(typ, p, fld) ({ \
+	BUILD_BUG_ON(__zxdh_bit_sz(typ, fld) % 8); \
+	uint32_t fld_sz = __zxdh_bit_sz(typ, fld) / 8; \
+	uint8_t *addr = ZXDH_ADDR_OF(typ, p, fld); \
+	zxdh_get_value(fld_sz, addr); \
+})

total: 0 errors, 0 warnings, 14 checks, 2089 lines checked
Warning in drivers/net/zxdh/zxdh_common.h:
Using __builtin helpers, prefer EAL macros

  parent reply	other threads:[~2025-03-21  7:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250321073200.2015711-15-chen.bingbin@zte.com.cn>
2025-03-21  7:17 ` |SUCCESS| pw152501-152514 " qemudev
2025-03-21  7:22 ` qemudev
2025-03-21  7:53 ` checkpatch [this message]
2025-03-21  9:13 ` |SUCCESS| pw152501-152514 [PATCH] [v6,14/14] net/zxdh: optimize msg dpdklab
2025-03-21  9:16 ` dpdklab
2025-03-21  9:17 ` |PENDING| " dpdklab
2025-03-21  9:25 ` |SUCCESS| " dpdklab
2025-03-21  9:27 ` dpdklab
2025-03-21  9:29 ` |PENDING| " dpdklab
2025-03-21  9:31 ` |SUCCESS| " dpdklab
2025-03-21  9:32 ` dpdklab
2025-03-21  9:37 ` dpdklab
2025-03-21  9:43 ` dpdklab
2025-03-21  9:49 ` dpdklab
2025-03-21  9:51 ` dpdklab
2025-03-21  9:53 ` dpdklab
2025-03-21  9:53 ` |PENDING| " dpdklab
2025-03-21  9:57 ` |SUCCESS| " dpdklab
2025-03-21 10:06 ` |SUCCESS| pw152514 [PATCH v6 14/14] net/zxdh: optimize msg processing ops and modify some issues 0-day Robot
2025-03-21 10:16 ` |SUCCESS| pw152501-152514 [PATCH] [v6,14/14] net/zxdh: optimize msg dpdklab
2025-03-21 10:36 ` dpdklab
2025-03-21 12:03 ` dpdklab
2025-03-21 12:22 ` dpdklab
2025-03-21 12:37 ` dpdklab
2025-03-21 13:49 ` dpdklab
2025-03-21 21:27 ` dpdklab

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=20250321075303.8C4BB127183@dpdk.org \
    --to=checkpatch@dpdk.org \
    --cc=chen.bingbin@zte.com.cn \
    --cc=test-report@dpdk.org \
    /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).