[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 47/50] checkpatch: add hwaddr to @typeList
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 47/50] checkpatch: add hwaddr to @typeList |
Date: |
Tue, 19 Sep 2017 14:29:36 +0200 |
From: Greg Kurz <address@hidden>
The script doesn't know about all possible types and learn them as
it parses the code. If it reaches a line with a type cast but the
type isn't known yet, it is misinterpreted as an identifier.
For example the following line:
foo = (hwaddr) -1;
results in the following false-positive to be reported:
ERROR: spaces required around that '-' (ctx:VxV)
Let's add this standard QEMU type to the list of pre-known types.
Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
scripts/checkpatch.pl | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 28d71b3..3c0a28e 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -263,6 +263,7 @@ our @typeList = (
qr{${Ident}_handler},
qr{${Ident}_handler_fn},
qr{target_(?:u)?long},
+ qr{hwaddr},
);
# This can be modified by sub possible. Since it can be empty, be careful
--
1.8.3.1
- Re: [Qemu-devel] [PULL 43/50] update-linux-headers: prepare for hyperv.h removal, (continued)
- [Qemu-devel] [PULL 41/50] i386/cpu/hyperv: support over 64 vcpus for windows guests, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 45/50] target/i386: fix "info mem" for LA57 mode, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 39/50] Makefile: Remove libqemustub.a, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 40/50] Convert remaining single line fprintf() to warn_report(), Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 44/50] scripts: let checkpatch.pl process an entire GIT branch, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 48/50] osdep.h: Prohibit disabling assert() in supported builds, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 46/50] accel/hax: move hax-stub.c to accel/stubs/, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 50/50] docker: fix creation of archives, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 47/50] checkpatch: add hwaddr to @typeList,
Paolo Bonzini <=
- [Qemu-devel] [PULL 49/50] default-configs: Replace $(and ...) with $(call land, ...), Paolo Bonzini, 2017/09/19