Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217590
b: refs/heads/master
c: 3bf9a00
h: refs/heads/master
v: v3
  • Loading branch information
Rabin Vincent authored and Linus Torvalds committed Oct 26, 2010
1 parent 9097f2c commit e89e5c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9fe287d79b0af983050d24e7916cf3d1f019f553
refs/heads/master: 3bf9a009fccea422bc355414a3bdf5f35fff9f36
14 changes: 13 additions & 1 deletion trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,11 @@ sub process {
$here = "#$realline: " if ($file);

# extract the filename as it passes
if ($line=~/^\+\+\+\s+(\S+)/) {
if ($line =~ /^diff --git.*?(\S+)$/) {
$realfile = $1;
$realfile =~ s@^([^/]*)/@@;

} elsif ($line =~ /^\+\+\+\s+(\S+)/) {
$realfile = $1;
$realfile =~ s@^([^/]*)/@@;

Expand All @@ -1339,6 +1343,14 @@ sub process {

$cnt_lines++ if ($realcnt != 0);

# Check for incorrect file permissions
if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
my $permhere = $here . "FILE: $realfile\n";
if ($realfile =~ /(Makefile|Kconfig|\.c|\.h|\.S|\.tmpl)$/) {
ERROR("do not set execute permissions for source files\n" . $permhere);
}
}

#check the patch for a signoff:
if ($line =~ /^\s*signed-off-by:/i) {
# This is a signoff, if ugly, so do not double report.
Expand Down

0 comments on commit e89e5c8

Please sign in to comment.