Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114758
b: refs/heads/master
c: e09dec4
h: refs/heads/master
v: v3
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Oct 16, 2008
1 parent 01c5408 commit 5522b42
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: c1ab33269a84d6056d2ffc728d8bbaa26377d3e3
refs/heads/master: e09dec4831bbb319987215ea0a280b2a620021b7
13 changes: 9 additions & 4 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1942,12 +1942,17 @@ sub process {

#warn if <asm/foo.h> is #included and <linux/foo.h> is available (uses RAW line)
if ($tree && $rawline =~ m{^.\s*\#\s*include\s*\<asm\/(.*)\.h\>}) {
my $checkfile = "include/linux/$1.h";
if (-f "$root/$checkfile" && $realfile ne $checkfile &&
my $file = "$1.h";
my $checkfile = "include/linux/$file";
if (-f "$root/$checkfile" &&
$realfile ne $checkfile &&
$1 ne 'irq')
{
WARN("Use #include <linux/$1.h> instead of <asm/$1.h>\n" .
$herecurr);
if ($realfile =~ m{^arch/}) {
CHK("Consider using #include <linux/$file> instead of <asm/$file>\n" . $herecurr);
} else {
WARN("Use #include <linux/$file> instead of <asm/$file>\n" . $herecurr);
}
}
}

Expand Down

0 comments on commit 5522b42

Please sign in to comment.