mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Checkpatch miscomplaint about macro parentheses enclosure in traces
@ 2024-12-03 18:27 David Howells
  0 siblings, 0 replies; only message in thread
From: David Howells @ 2024-12-03 18:27 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches; +Cc: dhowells, linux-kernel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-03 18:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-03 18:27 Checkpatch miscomplaint about macro parentheses enclosure in traces David Howells

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®