[<prev] [next>] [day] [month] [year] [list]
Message-ID: <676596.1733250446@warthog.procyon.org.uk>
Date: Tue, 03 Dec 2024 18:27:26 +0000
From: David Howells <dhowells@...hat.com>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>
cc: dhowells@...hat.com, linux-kernel@...r.kernel.org
Subject: Checkpatch miscomplaint about macro parentheses enclosure in traces
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
Powered by blists - more mailing lists