[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 27/74] checkpatch: allow space in more places before
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 27/74] checkpatch: allow space in more places before a bracket |
Date: |
Tue, 21 Aug 2018 19:01:59 +0200 |
From: Heinrich Schuchardt <address@hidden>
Allow a space between a colon and subsequent opening bracket. This
sequence may occur in inline assembler statements like
asm(
"ldr %[out], [%[in]]\n\t"
: [out] "=r" (ret)
: [in] "r" (addr)
);
Allow a space between a comma and subsequent opening bracket. This
sequence may occur in designated initializers.
To ease backporting the patch, I am also changing the comma-bracket
detection (added in QEMU by commit 409db6eb7199af7a2f09f746bd1b793e9daefe5f)
to use the same regex as brackets and colons (as done independently
by Linux commit daebc534ac15f991961a5bb433e515988220e9bf).
Link: http://lkml.kernel.org/r/address@hidden
Signed-off-by: Heinrich Schuchardt <address@hidden>
Acked-by: Joe Perches <address@hidden>
Signed-off-by: Andrew Morton <address@hidden>
Signed-off-by: Linus Torvalds <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
scripts/checkpatch.pl | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 0553634..3765b0e 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1929,9 +1929,8 @@ sub process {
my ($where, $prefix) = ($-[1], $1);
if ($prefix !~ /$Type\s+$/ &&
($where != 0 || $prefix !~ /^.\s+$/) &&
- $prefix !~ /{\s+$/ &&
$prefix !~ /\#\s*define[^(]*\([^)]*\)\s+$/ &&
- $prefix !~ /,\s+$/) {
+ $prefix !~ /[,{:]\s+$/) {
ERROR("space prohibited before open square
bracket '['\n" . $herecurr);
}
}
--
1.8.3.1
- [Qemu-devel] [PULL 07/74] chardev/char-fe: Fix typos, (continued)
- [Qemu-devel] [PULL 07/74] chardev/char-fe: Fix typos, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 13/74] hw/timer/mc146818rtc: Fix introspection problem, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 15/74] tests/device-introspection: Check that the qom-tree and qtree do not change, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 14/74] tests: Skip old versioned machine types in quick testing mode, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 24/74] vl: add -enable-sync-profile, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 20/74] qsp: add qsp_reset, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 16/74] tests/device-introspect: Test with all machines, not only with "none", Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 22/74] qsp: track BQL callers explicitly, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 19/74] qsp: add sort_by option to qsp_report, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 31/74] lsi_scsi: add support for PPR Extended Message, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 27/74] checkpatch: allow space in more places before a bracket,
Paolo Bonzini <=
- [Qemu-devel] [PULL 36/74] rcu_queue: use atomic_set in QLIST_REMOVE_RCU, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 33/74] build-sys: remove glib_subprocess check, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 18/74] qsp: QEMU's Synchronization Profiler, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 48/74] qemu-guest-agent: freeze-hook to ignore dpkg files as well, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 21/74] qsp: support call site coalescing, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 32/74] kvm: add call to qemu_add_opts() for -overcommit option, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 25/74] hmp-commands: add sync-profile, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 47/74] hw/intc/apic: Switch away from old_mmio, Paolo Bonzini, 2018/08/21