[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/27] checkpatch: tweak "struct should normally be c
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 01/27] checkpatch: tweak "struct should normally be const" warning |
Date: |
Mon, 31 Oct 2016 15:37:17 +0100 |
Avoid triggering on
typedef struct BlockJobDriver BlockJobDriver;
or
struct BlockJobDriver {
Cc: John Snow <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3afa19a..1f1c9d3 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2498,8 +2498,8 @@ sub process {
VMStateDescription|
VMStateInfo}x;
if ($line !~ /\bconst\b/ &&
- $line =~ /\b($struct_ops)\b/) {
- ERROR("struct $1 should normally be const\n" .
+ $line =~ /\b($struct_ops)\b.*=/) {
+ ERROR("initializer for struct $1 should normally be
const\n" .
$herecurr);
}
--
2.7.4
- [Qemu-devel] [PULL 00/27] Misc patches for 2016-10-31, Paolo Bonzini, 2016/10/31
- [Qemu-devel] [PULL 01/27] checkpatch: tweak "struct should normally be const" warning,
Paolo Bonzini <=
- [Qemu-devel] [PULL 03/27] qemu-error: remove dependency of stubs on monitor, Paolo Bonzini, 2016/10/31
- [Qemu-devel] [PULL 02/27] nbd: Use CoQueue for free_sema instead of CoMutex, Paolo Bonzini, 2016/10/31
- [Qemu-devel] [PULL 04/27] tests: send error_report to test log, Paolo Bonzini, 2016/10/31
- [Qemu-devel] [PULL 06/27] exec.c: do not truncate non-empty memory backend file, Paolo Bonzini, 2016/10/31
- [Qemu-devel] [PULL 05/27] exec.c: ensure all AddressSpaceDispatch updates under RCU, Paolo Bonzini, 2016/10/31
- [Qemu-devel] [PULL 08/27] hostmem-file: make option 'size' optional, Paolo Bonzini, 2016/10/31
- [Qemu-devel] [PULL 09/27] nbd: Add qemu-nbd -D for human-readable description, Paolo Bonzini, 2016/10/31