[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 31/35] checkpatch: warn about qemu/queue.h head struc
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 31/35] checkpatch: warn about qemu/queue.h head structs that are not typedef-ed |
Date: |
Tue, 18 Dec 2018 00:16:56 +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 df2da09b06..440d95d117 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2262,6 +2262,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.20.1
- [Qemu-devel] [PULL 18/35] build-sys: don't include windows.h, osdep.h does it, (continued)
- [Qemu-devel] [PULL 18/35] build-sys: don't include windows.h, osdep.h does it, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 19/35] build-sys: move windows defines in osdep.h header, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 20/35] build-sys: build with Vista API by default, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 21/35] qga: drop < Vista compatibility, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 22/35] test: execute g_test_run when tests are skipped, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 24/35] qemu/queue.h: do not access tqe_prev directly, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 23/35] test: replace gtester with a TAP driver, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 25/35] vfio: make vfio_address_spaces static, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 26/35] qemu/queue.h: leave head structs anonymous unless necessary, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 27/35] qemu/queue.h: typedef QTAILQ heads, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 31/35] checkpatch: warn about qemu/queue.h head structs that are not typedef-ed,
Paolo Bonzini <=
- [Qemu-devel] [PULL 28/35] qemu/queue.h: remove Q_TAILQ_{HEAD, ENTRY}, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 29/35] qemu/queue.h: reimplement QTAILQ without pointer-to-pointers, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 32/35] hw/watchdog/wdt_i6300esb: remove a unnecessary comment, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 33/35] scripts: add script to convert multiline comments into 4-line format, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 30/35] qemu/queue.h: simplify reverse access to QTAILQ, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 34/35] remove space-tab sequences, Paolo Bonzini, 2018/12/17
- [Qemu-devel] [PULL 35/35] avoid TABs in files that only contain a few, Paolo Bonzini, 2018/12/17
- Re: [Qemu-devel] [PULL 00/35] Misc patches for 2018-12-18, Peter Maydell, 2018/12/19