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| pw154951 [PATCH v3 2/2] net/zxdh: add support flow director ops
Date: Wed,  2 Jul 2025 09:42:20 +0200 (CEST)	[thread overview]
Message-ID: <20250702074220.EEEE81252FD@dpdk.org> (raw)
In-Reply-To: <20250702073453.113779-3-chen.bingbin@zte.com.cn>

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

_coding style issues_


WARNING:TYPO_SPELLING: 'stdio' may be misspelled - perhaps 'studio'?
#374: FILE: drivers/net/zxdh/zxdh_flow.c:6:
+#include <stdio.h>

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'buf_size' - possible side-effects?
#415: FILE: drivers/net/zxdh/zxdh_flow.c:47:
+#define MKDUMPSTR(buf, buf_size, cur_len, ...) \
+do { \
+	if ((cur_len) >= (buf_size)) \
+		break; \
+	(cur_len) += snprintf((buf) + (cur_len), (buf_size) - (cur_len), __VA_ARGS__); \
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'cur_len' - possible side-effects?
#415: FILE: drivers/net/zxdh/zxdh_flow.c:47:
+#define MKDUMPSTR(buf, buf_size, cur_len, ...) \
+do { \
+	if ((cur_len) >= (buf_size)) \
+		break; \
+	(cur_len) += snprintf((buf) + (cur_len), (buf_size) - (cur_len), __VA_ARGS__); \
+} while (0)

CHECK:CAMELCASE: Avoid CamelCase: <IPv6_BYTES_FMT>
#493: FILE: drivers/net/zxdh/zxdh_flow.c:125:
+		"L3	  dstip=0x%08x 0x%08x 0x%08x 0x%08x("IPv6_BYTES_FMT")
",

CHECK:CONCATENATED_STRING: Concatenated strings should use spaces between elements
#493: FILE: drivers/net/zxdh/zxdh_flow.c:125:
+		"L3	  dstip=0x%08x 0x%08x 0x%08x 0x%08x("IPv6_BYTES_FMT")
",

CHECK:CAMELCASE: Avoid CamelCase: <IPv6_BYTES>
#497: FILE: drivers/net/zxdh/zxdh_flow.c:129:
+		IPv6_BYTES(key->dst_ip));

CHECK:CONCATENATED_STRING: Concatenated strings should use spaces between elements
#499: FILE: drivers/net/zxdh/zxdh_flow.c:131:
+		"	  srcip=0x%08x 0x%08x 0x%08x 0x%08x("IPv6_BYTES_FMT")
",

CHECK:CAMELCASE: Avoid CamelCase: <IPv4_BYTES>
#2409: FILE: drivers/net/zxdh/zxdh_flow.h:32:
+#ifndef IPv4_BYTES

CHECK:CAMELCASE: Avoid CamelCase: <IPv4_BYTES_FMT>
#2410: FILE: drivers/net/zxdh/zxdh_flow.h:33:
+#define IPv4_BYTES_FMT "%" PRIu8 ".%" PRIu8 ".%" PRIu8 ".%" PRIu8

CHECK:CAMELCASE: Avoid CamelCase: <PRIu8>
#2410: FILE: drivers/net/zxdh/zxdh_flow.h:33:
+#define IPv4_BYTES_FMT "%" PRIu8 ".%" PRIu8 ".%" PRIu8 ".%" PRIu8

ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#2411: FILE: drivers/net/zxdh/zxdh_flow.h:34:
+#define IPv4_BYTES(addr) \
+		(uint8_t)(((addr) >> 24) & 0xFF),\
+		(uint8_t)(((addr) >> 16) & 0xFF),\
+		(uint8_t)(((addr) >> 8) & 0xFF),\
+		(uint8_t)((addr) & 0xFF)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'addr' - possible side-effects?
#2411: FILE: drivers/net/zxdh/zxdh_flow.h:34:
+#define IPv4_BYTES(addr) \
+		(uint8_t)(((addr) >> 24) & 0xFF),\
+		(uint8_t)(((addr) >> 16) & 0xFF),\
+		(uint8_t)(((addr) >> 8) & 0xFF),\
+		(uint8_t)((addr) & 0xFF)

ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#2421: FILE: drivers/net/zxdh/zxdh_flow.h:44:
+#define IPv6_BYTES(addr) \
+	addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], \
+	addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'addr' - possible side-effects?
#2421: FILE: drivers/net/zxdh/zxdh_flow.h:44:
+#define IPv6_BYTES(addr) \
+	addr[0], addr[1], addr[2], addr[3], addr[4], addr[5], addr[6], addr[7], \
+	addr[8], addr[9], addr[10], addr[11], addr[12], addr[13], addr[14], addr[15]

total: 2 errors, 1 warnings, 11 checks, 3045 lines checked

  parent reply	other threads:[~2025-07-02  7:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250702073453.113779-3-chen.bingbin@zte.com.cn>
2025-07-02  7:07 ` |SUCCESS| pw154950-154951 " qemudev
2025-07-02  7:12 ` qemudev
2025-07-02  7:42 ` checkpatch [this message]
2025-07-02  9:03 ` |SUCCESS| pw154951 " 0-day Robot

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=20250702074220.EEEE81252FD@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).