|
@@ -24,6 +24,7 @@ my $emacs = 0;
|
|
my $terse = 0;
|
|
my $terse = 0;
|
|
my $file = 0;
|
|
my $file = 0;
|
|
my $check = 0;
|
|
my $check = 0;
|
|
|
|
+my $check_orig = 0;
|
|
my $summary = 1;
|
|
my $summary = 1;
|
|
my $mailback = 0;
|
|
my $mailback = 0;
|
|
my $summary_file = 0;
|
|
my $summary_file = 0;
|
|
@@ -146,6 +147,7 @@ GetOptions(
|
|
help(0) if ($help);
|
|
help(0) if ($help);
|
|
|
|
|
|
$fix = 1 if ($fix_inplace);
|
|
$fix = 1 if ($fix_inplace);
|
|
|
|
+$check_orig = $check;
|
|
|
|
|
|
my $exit = 0;
|
|
my $exit = 0;
|
|
|
|
|
|
@@ -1813,11 +1815,13 @@ sub process {
|
|
$here = "#$linenr: " if (!$file);
|
|
$here = "#$linenr: " if (!$file);
|
|
$here = "#$realline: " if ($file);
|
|
$here = "#$realline: " if ($file);
|
|
|
|
|
|
|
|
+ my $found_file = 0;
|
|
# extract the filename as it passes
|
|
# extract the filename as it passes
|
|
if ($line =~ /^diff --git.*?(\S+)$/) {
|
|
if ($line =~ /^diff --git.*?(\S+)$/) {
|
|
$realfile = $1;
|
|
$realfile = $1;
|
|
$realfile =~ s@^([^/]*)/@@ if (!$file);
|
|
$realfile =~ s@^([^/]*)/@@ if (!$file);
|
|
$in_commit_log = 0;
|
|
$in_commit_log = 0;
|
|
|
|
+ $found_file = 1;
|
|
} elsif ($line =~ /^\+\+\+\s+(\S+)/) {
|
|
} elsif ($line =~ /^\+\+\+\s+(\S+)/) {
|
|
$realfile = $1;
|
|
$realfile = $1;
|
|
$realfile =~ s@^([^/]*)/@@ if (!$file);
|
|
$realfile =~ s@^([^/]*)/@@ if (!$file);
|
|
@@ -1834,6 +1838,15 @@ sub process {
|
|
ERROR("MODIFIED_INCLUDE_ASM",
|
|
ERROR("MODIFIED_INCLUDE_ASM",
|
|
"do not modify files in include/asm, change architecture specific files in include/asm-<architecture>\n" . "$here$rawline\n");
|
|
"do not modify files in include/asm, change architecture specific files in include/asm-<architecture>\n" . "$here$rawline\n");
|
|
}
|
|
}
|
|
|
|
+ $found_file = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if ($found_file) {
|
|
|
|
+ if ($realfile =~ m@^(drivers/net/|net/)@) {
|
|
|
|
+ $check = 1;
|
|
|
|
+ } else {
|
|
|
|
+ $check = $check_orig;
|
|
|
|
+ }
|
|
next;
|
|
next;
|
|
}
|
|
}
|
|
|
|
|