aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-10-19 15:38:07 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-10-19 15:38:07 +0100
commita8b392ac9a158ff26cbbc2c2d205c370c35f64a2 (patch)
treebfcf54bd4969defa337523797afa73d835aa9c4e /scripts
parentf2a48d696c12aaac12993364371daae9f6233c37 (diff)
parent3da023b5827543ee4c022986ea2ad9d1274410b2 (diff)
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* TCG 8-byte atomic accesses bugfix (Andrew) * Report disk rotation rate (Daniel) * Report invalid scsi-disk block size configuration (Mark) * KVM and memory API MemoryListener fixes (David, Maxime, Peter Xu) * x86 CPU hotplug crash fix (Igor) * Load/store API documentation (Peter Maydell) * Small fixes by myself and Thomas * qdev DEVICE_DELETED deferral (Michael) # gpg: Signature made Wed 18 Oct 2017 10:56:24 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (29 commits) scsi: reject configurations with logical block size > physical block size qdev: defer DEVICE_DEL event until instance_finalize() Revert "qdev: Free QemuOpts when the QOM path goes away" qdev: store DeviceState's canonical path to use when unparenting qemu-pr-helper: use new libmultipath API watch_mem_write: implement 8-byte accesses notdirty_mem_write: implement 8-byte accesses memory: reuse section_from_flat_range() kvm: simplify kvm_align_section() kvm: region_add and region_del is not called on updates kvm: fix error message when failing to unregister slot kvm: tolerate non-existing slot for log_start/log_stop/log_sync kvm: fix alignment of ram address memory: call log_start after region_add target/i386: trap on instructions longer than >15 bytes target/i386: introduce x86_ld*_code tco: add trace events docs/devel/loads-stores.rst: Document our various load and store APIs nios2: define tcg_env build: remove CONFIG_LIBDECNUMBER ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl19
1 files changed, 10 insertions, 9 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 0c41f1212f..ce9f08eb9f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -11,6 +11,8 @@ use warnings;
my $P = $0;
$P =~ s@.*/@@g;
+our $SrcFile = qr{\.(?:h|c|cpp|s|S|pl|py|sh)$};
+
my $V = '0.31';
use Getopt::Long qw(:config no_auto_abbrev);
@@ -101,30 +103,29 @@ if ($#ARGV < 0) {
}
if (!defined $chk_branch && !defined $chk_patch && !defined $file) {
- $chk_branch = $ARGV[0] =~ /\.\./ ? 1 : 0;
- $chk_patch = $chk_branch ? 0 :
- $ARGV[0] =~ /\.patch$/ || $ARGV[0] eq "-" ? 1 : 0;
- $file = $chk_branch || $chk_patch ? 0 : 1;
+ $chk_branch = $ARGV[0] =~ /.\.\./ ? 1 : 0;
+ $file = $ARGV[0] =~ /$SrcFile/ ? 1 : 0;
+ $chk_patch = $chk_branch || $file ? 0 : 1;
} elsif (!defined $chk_branch && !defined $chk_patch) {
if ($file) {
$chk_branch = $chk_patch = 0;
} else {
- $chk_branch = $ARGV[0] =~ /\.\./ ? 1 : 0;
+ $chk_branch = $ARGV[0] =~ /.\.\./ ? 1 : 0;
$chk_patch = $chk_branch ? 0 : 1;
}
} elsif (!defined $chk_branch && !defined $file) {
if ($chk_patch) {
$chk_branch = $file = 0;
} else {
- $chk_branch = $ARGV[0] =~ /\.\./ ? 1 : 0;
+ $chk_branch = $ARGV[0] =~ /.\.\./ ? 1 : 0;
$file = $chk_branch ? 0 : 1;
}
} elsif (!defined $chk_patch && !defined $file) {
if ($chk_branch) {
$chk_patch = $file = 0;
} else {
- $chk_patch = $ARGV[0] =~ /\.patch$/ || $ARGV[0] eq "-" ? 1 : 0;
- $file = $chk_patch ? 0 : 1;
+ $file = $ARGV[0] =~ /$SrcFile/ ? 1 : 0;
+ $chk_patch = $file ? 0 : 1;
}
} elsif (!defined $chk_branch) {
$chk_branch = $chk_patch || $file ? 0 : 1;
@@ -1443,7 +1444,7 @@ sub process {
}
# check we are in a valid source file if not then ignore this hunk
- next if ($realfile !~ /\.(h|c|cpp|s|S|pl|py|sh)$/);
+ next if ($realfile !~ /$SrcFile/);
#90 column limit
if ($line =~ /^\+/ &&