checkpatch: repair faulty executable-bit check.

Existing executable-bit test only works on second and later files
contained in the patch.  Correct this so all patches in the file
are tested.

Change-Id: Ie9363473f0d2fc067f9c593c86495d15e8e5d546
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
(cherry picked from commit 246e1f183dd3c2bfe63722ca5b207473cb9a0219)

Conflicts:

	scripts/checkpatch.pl
This commit is contained in:
Gregory Bean 2011-10-17 12:27:01 -07:00 committed by Stephen Boyd
parent ec9255dbf8
commit d8ac9d4585

View file

@ -1451,7 +1451,6 @@ sub process {
my @setup_docs = ();
my $setup_docs = 0;
my $in_code_block = 0;
my $exec_file = "";
my $shorttext = BEFORE_SHORTTEXT;
@ -1599,6 +1598,7 @@ sub process {
$realfile = $1;
$realfile =~ s@^([^/]*)/@@;
$in_commit_log = 0;
$exec_file = $realfile;
} elsif ($line =~ /^\+\+\+\s+(\S+)/) {
$realfile = $1;
$realfile =~ s@^([^/]*)/@@;
@ -1615,16 +1615,14 @@ sub process {
ERROR("MODIFIED_INCLUDE_ASM",
"do not modify files in include/asm, change architecture specific files in include/asm-<architecture>\n" . "$here$rawline\n");
}
$in_code_block = 1;
$exec_file = "";
next;
}
elsif ($rawline =~ /^diff.+a\/(.+)\sb\/.+$/) {
$exec_file = $1;
$in_code_block = 0;
}
#Check state to make sure we aren't in code block.
elsif (!$in_code_block &&
($exec_file =~ /^.+\.[chS]$/ or
elsif (($exec_file =~ /^.+\.[chS]$/ or
$exec_file =~ /^.+\.txt$/ or
$exec_file =~ /^.+\.ihex$/ or
$exec_file =~ /^.+\.hex$/ or