diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 21:08:07 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 21:08:07 -0400 |
| commit | d52bd54db8be8999df6df5a776f38c4f8b5e9cea (patch) | |
| tree | 0d8f436e959bb975c002ddf12ea1bdc9adadd04f /scripts | |
| parent | 8cbdd85bda499d028b8f128191f392d701e8e41d (diff) | |
| parent | 3bd080e4d8f2351ee3e143f0ec9307cc95ae6639 (diff) | |
Merge branch 'akpm' (patches from Andrew)
Merge yet more updates from Andrew Morton:
- the rest of ocfs2
- various hotfixes, mainly MM
- quite a bit of misc stuff - drivers, fork, exec, signals, etc.
- printk updates
- firmware
- checkpatch
- nilfs2
- more kexec stuff than usual
- rapidio updates
- w1 things
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (111 commits)
ipc: delete "nr_ipc_ns"
kcov: allow more fine-grained coverage instrumentation
init/Kconfig: add clarification for out-of-tree modules
config: add android config fragments
init/Kconfig: ban CONFIG_LOCALVERSION_AUTO with allmodconfig
relay: add global mode support for buffer-only channels
init: allow blacklisting of module_init functions
w1:omap_hdq: fix regression
w1: add helper macro module_w1_family
w1: remove need for ida and use PLATFORM_DEVID_AUTO
rapidio/switches: add driver for IDT gen3 switches
powerpc/fsl_rio: apply changes for RIO spec rev 3
rapidio: modify for rev.3 specification changes
rapidio: change inbound window size type to u64
rapidio/idt_gen2: fix locking warning
rapidio: fix error handling in mbox request/release functions
rapidio/tsi721_dma: advance queue processing from transfer submit call
rapidio/tsi721: add messaging mbox selector parameter
rapidio/tsi721: add PCIe MRRS override parameter
rapidio/tsi721_dma: add channel mask and queue size parameters
...
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.lib | 2 | ||||
| -rwxr-xr-x | scripts/checkpatch.pl | 29 | ||||
| -rwxr-xr-x | scripts/get_maintainer.pl | 20 |
3 files changed, 41 insertions, 10 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index e89c214745eb..0a07f9014944 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -138,7 +138,7 @@ endif | |||
| 138 | 138 | ||
| 139 | ifeq ($(CONFIG_KCOV),y) | 139 | ifeq ($(CONFIG_KCOV),y) |
| 140 | _c_flags += $(if $(patsubst n%,, \ | 140 | _c_flags += $(if $(patsubst n%,, \ |
| 141 | $(KCOV_INSTRUMENT_$(basetarget).o)$(KCOV_INSTRUMENT)y), \ | 141 | $(KCOV_INSTRUMENT_$(basetarget).o)$(KCOV_INSTRUMENT)$(CONFIG_KCOV_INSTRUMENT_ALL)), \ |
| 142 | $(CFLAGS_KCOV)) | 142 | $(CFLAGS_KCOV)) |
| 143 | endif | 143 | endif |
| 144 | 144 | ||
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 24a08363995a..4de3cc42fc50 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -55,6 +55,7 @@ my $spelling_file = "$D/spelling.txt"; | |||
| 55 | my $codespell = 0; | 55 | my $codespell = 0; |
| 56 | my $codespellfile = "/usr/share/codespell/dictionary.txt"; | 56 | my $codespellfile = "/usr/share/codespell/dictionary.txt"; |
| 57 | my $color = 1; | 57 | my $color = 1; |
| 58 | my $allow_c99_comments = 1; | ||
| 58 | 59 | ||
| 59 | sub help { | 60 | sub help { |
| 60 | my ($exitcode) = @_; | 61 | my ($exitcode) = @_; |
| @@ -227,9 +228,9 @@ if ($^V && $^V lt $minimum_perl_version) { | |||
| 227 | } | 228 | } |
| 228 | } | 229 | } |
| 229 | 230 | ||
| 231 | #if no filenames are given, push '-' to read patch from stdin | ||
| 230 | if ($#ARGV < 0) { | 232 | if ($#ARGV < 0) { |
| 231 | print "$P: no input files\n"; | 233 | push(@ARGV, '-'); |
| 232 | exit(1); | ||
| 233 | } | 234 | } |
| 234 | 235 | ||
| 235 | sub hash_save_array_words { | 236 | sub hash_save_array_words { |
| @@ -1144,6 +1145,11 @@ sub sanitise_line { | |||
| 1144 | $res =~ s@(\#\s*(?:error|warning)\s+).*@$1$clean@; | 1145 | $res =~ s@(\#\s*(?:error|warning)\s+).*@$1$clean@; |
| 1145 | } | 1146 | } |
| 1146 | 1147 | ||
| 1148 | if ($allow_c99_comments && $res =~ m@(//.*$)@) { | ||
| 1149 | my $match = $1; | ||
| 1150 | $res =~ s/\Q$match\E/"$;" x length($match)/e; | ||
| 1151 | } | ||
| 1152 | |||
| 1147 | return $res; | 1153 | return $res; |
| 1148 | } | 1154 | } |
| 1149 | 1155 | ||
| @@ -2063,6 +2069,7 @@ sub process { | |||
| 2063 | my $is_patch = 0; | 2069 | my $is_patch = 0; |
| 2064 | my $in_header_lines = $file ? 0 : 1; | 2070 | my $in_header_lines = $file ? 0 : 1; |
| 2065 | my $in_commit_log = 0; #Scanning lines before patch | 2071 | my $in_commit_log = 0; #Scanning lines before patch |
| 2072 | my $has_commit_log = 0; #Encountered lines before patch | ||
| 2066 | my $commit_log_possible_stack_dump = 0; | 2073 | my $commit_log_possible_stack_dump = 0; |
| 2067 | my $commit_log_long_line = 0; | 2074 | my $commit_log_long_line = 0; |
| 2068 | my $commit_log_has_diff = 0; | 2075 | my $commit_log_has_diff = 0; |
| @@ -2453,9 +2460,9 @@ sub process { | |||
| 2453 | 2460 | ||
| 2454 | # Check for git id commit length and improperly formed commit descriptions | 2461 | # Check for git id commit length and improperly formed commit descriptions |
| 2455 | if ($in_commit_log && !$commit_log_possible_stack_dump && | 2462 | if ($in_commit_log && !$commit_log_possible_stack_dump && |
| 2456 | $line !~ /^\s*(?:Link|Patchwork|http|BugLink):/i && | 2463 | $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink):/i && |
| 2457 | ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i || | 2464 | ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i || |
| 2458 | ($line =~ /\b[0-9a-f]{12,40}\b/i && | 2465 | ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i && |
| 2459 | $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i && | 2466 | $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i && |
| 2460 | $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) { | 2467 | $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) { |
| 2461 | my $init_char = "c"; | 2468 | my $init_char = "c"; |
| @@ -2560,6 +2567,7 @@ sub process { | |||
| 2560 | $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) { | 2567 | $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) { |
| 2561 | $in_header_lines = 0; | 2568 | $in_header_lines = 0; |
| 2562 | $in_commit_log = 1; | 2569 | $in_commit_log = 1; |
| 2570 | $has_commit_log = 1; | ||
| 2563 | } | 2571 | } |
| 2564 | 2572 | ||
| 2565 | # Check if there is UTF-8 in a commit log when a mail header has explicitly | 2573 | # Check if there is UTF-8 in a commit log when a mail header has explicitly |
| @@ -2763,6 +2771,10 @@ sub process { | |||
| 2763 | $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) { | 2771 | $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) { |
| 2764 | $msg_type = ""; | 2772 | $msg_type = ""; |
| 2765 | 2773 | ||
| 2774 | # EFI_GUID is another special case | ||
| 2775 | } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/) { | ||
| 2776 | $msg_type = ""; | ||
| 2777 | |||
| 2766 | # Otherwise set the alternate message types | 2778 | # Otherwise set the alternate message types |
| 2767 | 2779 | ||
| 2768 | # a comment starts before $max_line_length | 2780 | # a comment starts before $max_line_length |
| @@ -3337,7 +3349,7 @@ sub process { | |||
| 3337 | next if ($line =~ /^[^\+]/); | 3349 | next if ($line =~ /^[^\+]/); |
| 3338 | 3350 | ||
| 3339 | # check for declarations of signed or unsigned without int | 3351 | # check for declarations of signed or unsigned without int |
| 3340 | while ($line =~ m{($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) { | 3352 | while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) { |
| 3341 | my $type = $1; | 3353 | my $type = $1; |
| 3342 | my $var = $2; | 3354 | my $var = $2; |
| 3343 | $var = "" if (!defined $var); | 3355 | $var = "" if (!defined $var); |
| @@ -5722,8 +5734,9 @@ sub process { | |||
| 5722 | } | 5734 | } |
| 5723 | } | 5735 | } |
| 5724 | 5736 | ||
| 5725 | # check for #defines like: 1 << <digit> that could be BIT(digit) | 5737 | # check for #defines like: 1 << <digit> that could be BIT(digit), it is not exported to uapi |
| 5726 | if ($line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) { | 5738 | if ($realfile !~ m@^include/uapi/@ && |
| 5739 | $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) { | ||
| 5727 | my $ull = ""; | 5740 | my $ull = ""; |
| 5728 | $ull = "_ULL" if (defined($1) && $1 =~ /ll/i); | 5741 | $ull = "_ULL" if (defined($1) && $1 =~ /ll/i); |
| 5729 | if (CHK("BIT_MACRO", | 5742 | if (CHK("BIT_MACRO", |
| @@ -6044,7 +6057,7 @@ sub process { | |||
| 6044 | ERROR("NOT_UNIFIED_DIFF", | 6057 | ERROR("NOT_UNIFIED_DIFF", |
| 6045 | "Does not appear to be a unified-diff format patch\n"); | 6058 | "Does not appear to be a unified-diff format patch\n"); |
| 6046 | } | 6059 | } |
| 6047 | if ($is_patch && $filename ne '-' && $chk_signoff && $signoff == 0) { | 6060 | if ($is_patch && $has_commit_log && $chk_signoff && $signoff == 0) { |
| 6048 | ERROR("MISSING_SIGN_OFF", | 6061 | ERROR("MISSING_SIGN_OFF", |
| 6049 | "Missing Signed-off-by: line(s)\n"); | 6062 | "Missing Signed-off-by: line(s)\n"); |
| 6050 | } | 6063 | } |
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 1873421f2305..122fcdaf42c8 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
| @@ -133,6 +133,7 @@ my %VCS_cmds_git = ( | |||
| 133 | "author_pattern" => "^GitAuthor: (.*)", | 133 | "author_pattern" => "^GitAuthor: (.*)", |
| 134 | "subject_pattern" => "^GitSubject: (.*)", | 134 | "subject_pattern" => "^GitSubject: (.*)", |
| 135 | "stat_pattern" => "^(\\d+)\\t(\\d+)\\t\$file\$", | 135 | "stat_pattern" => "^(\\d+)\\t(\\d+)\\t\$file\$", |
| 136 | "file_exists_cmd" => "git ls-files \$file", | ||
| 136 | ); | 137 | ); |
| 137 | 138 | ||
| 138 | my %VCS_cmds_hg = ( | 139 | my %VCS_cmds_hg = ( |
| @@ -161,6 +162,7 @@ my %VCS_cmds_hg = ( | |||
| 161 | "author_pattern" => "^HgAuthor: (.*)", | 162 | "author_pattern" => "^HgAuthor: (.*)", |
| 162 | "subject_pattern" => "^HgSubject: (.*)", | 163 | "subject_pattern" => "^HgSubject: (.*)", |
| 163 | "stat_pattern" => "^(\\d+)\t(\\d+)\t\$file\$", | 164 | "stat_pattern" => "^(\\d+)\t(\\d+)\t\$file\$", |
| 165 | "file_exists_cmd" => "hg files \$file", | ||
| 164 | ); | 166 | ); |
| 165 | 167 | ||
| 166 | my $conf = which_conf(".get_maintainer.conf"); | 168 | my $conf = which_conf(".get_maintainer.conf"); |
| @@ -430,7 +432,7 @@ foreach my $file (@ARGV) { | |||
| 430 | die "$P: file '${file}' not found\n"; | 432 | die "$P: file '${file}' not found\n"; |
| 431 | } | 433 | } |
| 432 | } | 434 | } |
| 433 | if ($from_filename) { | 435 | if ($from_filename || vcs_file_exists($file)) { |
| 434 | $file =~ s/^\Q${cur_path}\E//; #strip any absolute path | 436 | $file =~ s/^\Q${cur_path}\E//; #strip any absolute path |
| 435 | $file =~ s/^\Q${lk_path}\E//; #or the path to the lk tree | 437 | $file =~ s/^\Q${lk_path}\E//; #or the path to the lk tree |
| 436 | push(@files, $file); | 438 | push(@files, $file); |
| @@ -2124,6 +2126,22 @@ sub vcs_file_blame { | |||
| 2124 | } | 2126 | } |
| 2125 | } | 2127 | } |
| 2126 | 2128 | ||
| 2129 | sub vcs_file_exists { | ||
| 2130 | my ($file) = @_; | ||
| 2131 | |||
| 2132 | my $exists; | ||
| 2133 | |||
| 2134 | my $vcs_used = vcs_exists(); | ||
| 2135 | return 0 if (!$vcs_used); | ||
| 2136 | |||
| 2137 | my $cmd = $VCS_cmds{"file_exists_cmd"}; | ||
| 2138 | $cmd =~ s/(\$\w+)/$1/eeg; # interpolate $cmd | ||
| 2139 | |||
| 2140 | $exists = &{$VCS_cmds{"execute_cmd"}}($cmd); | ||
| 2141 | |||
| 2142 | return $exists; | ||
| 2143 | } | ||
| 2144 | |||
| 2127 | sub uniq { | 2145 | sub uniq { |
| 2128 | my (@parms) = @_; | 2146 | my (@parms) = @_; |
| 2129 | 2147 | ||
