[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/8] checkpatch: warn about qemu/queue.h head struct
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 8/8] checkpatch: warn about qemu/queue.h head structs that are not typedef-ed |
Date: |
Mon, 10 Dec 2018 19:28:16 +0100 |
These are just like any other struct or union, so they should have
CamelCase typedefs.
Signed-off-by: Paolo Bonzini <address@hidden>
---
scripts/checkpatch.pl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a8d6e44107..b4b3495044 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2263,6 +2263,11 @@ sub process {
}
}
+ if ($line =~
/^.\s*(Q(?:S?LIST|SIMPLEQ|TAILQ)_HEAD)\s*\(\s*[^,]/ &&
+ $line !~ /^.typedef/) {
+ ERROR("named $1 should be typedefed separately\n" .
$herecurr);
+ }
+
# Need a space before open parenthesis after if, while etc
if ($line=~/\b(if|while|for|switch)\(/) {
ERROR("space required before the open parenthesis
'('\n" . $herecurr);
--
2.19.2
- [Qemu-devel] [PATCH for-4.0 v2 0/8] qemu/queue.h usage cleanup, improved QTAILQ API, Paolo Bonzini, 2018/12/10
- [Qemu-devel] [PATCH 1/8] qemu/queue.h: do not access tqe_prev directly, Paolo Bonzini, 2018/12/10
- [Qemu-devel] [PATCH 2/8] vfio: make vfio_address_spaces static, Paolo Bonzini, 2018/12/10
- [Qemu-devel] [PATCH 3/8] qemu/queue.h: leave head structs anonymous unless necessary, Paolo Bonzini, 2018/12/10
- [Qemu-devel] [PATCH 5/8] qemu/queue.h: remove Q_TAILQ_{HEAD, ENTRY}, Paolo Bonzini, 2018/12/10
- [Qemu-devel] [PATCH 4/8] qemu/queue.h: typedef QTAILQ heads, Paolo Bonzini, 2018/12/10
- [Qemu-devel] [PATCH 6/8] qemu/queue.h: reimplement QTAILQ without pointer-to-pointers, Paolo Bonzini, 2018/12/10
- [Qemu-devel] [PATCH 8/8] checkpatch: warn about qemu/queue.h head structs that are not typedef-ed,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 7/8] qemu/queue.h: simplify reverse access to QTAILQ, Paolo Bonzini, 2018/12/10