Skip to content

Commit

Permalink
Add STAILQ_HEAD() and STAILQ_ENTRY() to typedefs.checkpatch
Browse files Browse the repository at this point in the history
When using BSD queues from <sys/queues.h>, a singly linked tail queue
entry is declared with a macro:

STAILQ_ENTRY(type) var;

This makes checkpatch.pl unhappy because the type is unknown:

WARNING: Missing a blank line after declarations
+       struct file *file;
+       STAILQ_ENTRY(load_seg) link;

Checkpatch has the same problem with the macro STAILQ_HEAD().

This patch adds a regular expression to typedefs.checkpatch that
matches the macro part, thus fixing the warning.

Signed-off-by: Jorge Ramirez-Ortiz <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
  • Loading branch information
ldts authored and jforissier committed Oct 27, 2022
1 parent 32692b3 commit f6ec332
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions typedefs.checkpatch
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ TEE_BigIntFMM
TEE_BigInt
TEE_Attribute
TAILQ_ENTRY\(.*\)
STAILQ_HEAD\(.*\)
STAILQ_ENTRY\(.*\)
SLIST_HEAD\(.*\)
SLIST_ENTRY\(.*\)
mbedtls_mpi_uint
Expand Down

0 comments on commit f6ec332

Please sign in to comment.