Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217586
b: refs/heads/master
c: 53a3c44
h: refs/heads/master
v: v3
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Oct 26, 2010
1 parent 4d5864a commit 62fcb70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9446ef569c288e683225fec8337a0b2b81e75cc5
refs/heads/master: 53a3c4487a05b8f26ef72fe434a750a3402c998f
7 changes: 7 additions & 0 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2204,6 +2204,13 @@ sub process {
ERROR("space required before the open parenthesis '('\n" . $herecurr);
}
}
# Return of what appears to be an errno should normally be -'ve
if ($line =~ /^.\s*return\s*(E[A-Z]*)\s*;/) {
my $name = $1;
if ($name ne 'EOF' && $name ne 'ERROR') {
WARN("return of an errno should typically be -ve (return -$1)\n" . $herecurr);
}
}

# Need a space before open parenthesis after if, while etc
if ($line=~/\b(if|while|for|switch)\(/) {
Expand Down

0 comments on commit 62fcb70

Please sign in to comment.