automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Kai Ji <kai.ji@intel.com>
Subject: |WARNING| pw156944 [dpdk-dev v1] cryptodev: introduce constant-time memory comparison
Date: Thu, 25 Sep 2025 12:20:41 +0200 (CEST)	[thread overview]
Message-ID: <20250925102041.903EE12422E@dpdk.org> (raw)
In-Reply-To: <20250925102223.145471-1-kai.ji@intel.com>

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

_coding style issues_


ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#209: FILE: lib/cryptodev/rte_cryptodev.h:95:
+#define rte_consttime_memcmp(a, b, n) __extension__ ({ \
+	const volatile uint8_t *__pa = (const volatile uint8_t *)(a); \
+	const volatile uint8_t *__pb = (const volatile uint8_t *)(b); \
+	uint8_t __result = 0; \
+	for (size_t __i = 0; __i < (n); __i++) \
+		__result |= __pa[__i] ^ __pb[__i]; \
+	__result; \
+})

BUT SEE:

   do {} while (0) advice is over-stated in a few situations:

   The more obvious case is macros, like MODULE_PARM_DESC, invoked at
   file-scope, where C disallows code (it must be in functions).  See
   $exceptions if you have one to add by name.

   More troublesome is declarative macros used at top of new scope,
   like DECLARE_PER_CPU.  These might just compile with a do-while-0
   wrapper, but would be incorrect.  Most of these are handled by
   detecting struct,union,etc declaration primitives in $exceptions.

   Theres also macros called inside an if (block), which "return" an
   expression.  These cannot do-while, and need a ({}) wrapper.

   Enjoy this qualification while we work to improve our heuristics.

WARNING:MISSING_FIXES_TAG: The commit message has 'stable@', perhaps it also needs a 'Fixes:' tag?

total: 1 errors, 1 warnings, 93 lines checked

  parent reply	other threads:[~2025-09-25 10:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250925102223.145471-1-kai.ji@intel.com>
2025-09-25  9:55 ` |SUCCESS| " qemudev
2025-09-25 10:00 ` qemudev
2025-09-25 10:20 ` checkpatch [this message]
2025-09-25 10:51 ` |PENDING| pw156944 [PATCH] [v1] cryptodev: introduce constant-time m dpdklab
2025-09-25 10:54 ` |SUCCESS| " dpdklab
2025-09-25 11:11 ` dpdklab
2025-09-25 11:17 ` dpdklab
2025-09-25 11:27 ` dpdklab
2025-09-25 11:33 ` |PENDING| " dpdklab
2025-09-25 11:35 ` dpdklab
2025-09-25 11:39 ` |SUCCESS| pw156944 [dpdk-dev v1] cryptodev: introduce constant-time memory comparison 0-day Robot
2025-09-25 11:39 ` 0-day Robot
2025-09-25 11:41 ` |FAILURE| pw156944 [PATCH] [v1] cryptodev: introduce constant-time m dpdklab
2025-09-25 11:41 ` |SUCCESS| " dpdklab
2025-09-25 11:55 ` dpdklab
2025-09-25 11:55 ` dpdklab
2025-09-25 11:57 ` dpdklab
2025-09-25 12:06 ` dpdklab
2025-09-25 12:17 ` dpdklab
2025-09-25 12:23 ` dpdklab
2025-09-25 12:24 ` dpdklab
2025-09-25 15:51 ` dpdklab
2025-09-26  2:32 ` dpdklab
2025-09-27  2:04 ` dpdklab
2025-09-27  2:52 ` 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=20250925102041.903EE12422E@dpdk.org \
    --to=checkpatch@dpdk.org \
    --cc=kai.ji@intel.com \
    --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).