Skip to content

Commit 74bc5f6

Browse files
committed
checkpatch: special-case cacheline group macros
Currently, cacheline group macros trigger checkpatch warnings. For example: $ ./scripts/checkpatch.pl -g ba7e025a6c84aed012421468d83639e5dae982b0 WARNING: Missing a blank line after declarations #58: FILE: drivers/gpio/gpio-virtio.c:32: + struct virtio_gpio_response res; + __dma_from_device_group_end(); $ ./scripts/checkpatch.pl -g 5d4cc87 WARNING: Missing a blank line after declarations #267: FILE: include/net/sock.h:431: + int sk_rcvlowat; + __cacheline_group_end(sock_read_rx); But these are not actually statements - the following macros all expand to zero-length fields: __cacheline_group_begin() __cacheline_group_end() __cacheline_group_begin_aligned() __cacheline_group_end_aligned() __dma_from_device_group_begin() __dma_from_device_group_end() Add them to $declaration_macros so checkpatch recognizes this fact. Message-ID: <b345bb7e2d4e23672e3e5d1b283754dc11c7d8cd.1767647872.git.mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 1a266b6 commit 74bc5f6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/checkpatch.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,9 @@ sub build_types {
11001100
(?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(|
11011101
(?:$Storage\s+)?[HLP]?LIST_HEAD\s*\(|
11021102
(?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(|
1103-
(?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\(
1103+
(?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\(|
1104+
__cacheline_group_(?:begin|end)(?:_aligned)?\s*\(|
1105+
__dma_from_device_group_(?:begin|end)\s*\(
11041106
)};
11051107

11061108
our %allow_repeated_words = (

0 commit comments

Comments
 (0)