From: David Howells <dhowells@redhat.com>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: Checkpatch miscomplaint about macro parentheses enclosure in traces
Date: Tue, 03 Dec 2024 18:27:26 +0000 [thread overview]
Message-ID: <676596.1733250446@warthog.procyon.org.uk> (raw)
Hi,
I'm seeing:
ERROR: Macros with complex values should be enclosed in parentheses
#61: FILE: include/trace/events/rxrpc.h:484:
+#define rxrpc_tq_traces \
+ EM(rxrpc_tq_alloc, "ALLOC") \
+ EM(rxrpc_tq_cleaned, "CLEAN") \
+ EM(rxrpc_tq_decant, "DCNT ") \
+ EM(rxrpc_tq_decant_advance, "DCNT>") \
+ EM(rxrpc_tq_queue, "QUEUE") \
+ EM(rxrpc_tq_queue_dup, "QUE!!") \
+ EM(rxrpc_tq_rotate, "ROT ") \
+ EM(rxrpc_tq_rotate_and_free, "ROT-F") \
+ EM(rxrpc_tq_rotate_and_keep, "ROT-K") \
+ EM(rxrpc_tq_transmit, "XMIT ") \
+ E_(rxrpc_tq_transmit_advance, "XMIT>")
in the trace headers. However, this cannot be parenthesised as one of the
things it is being used for is to generate an enum, thereby reducing the
number of times the list of symbols is given.
Can this be at least downgraded to a warning, if not waived altogether, if the
file is in the include/trace/events/ directory? Possibly the "EM"/"E_"/"EMe"
prefix could be checked for.
David
reply other threads:[~2024-12-03 18:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=676596.1733250446@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®