* - checkpatch-reduce-warnings-for-include-of-asm-fooh-to-check-from-arch-barc.patch removed from -mm tree
@ 2008-10-18 23:13 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2008-10-18 23:13 UTC (permalink / raw)
To: apw, mm-commits
The patch titled
checkpatch: reduce warnings for #include of asm/foo.h to check from arch/bar.c
has been removed from the -mm tree. Its filename was
checkpatch-reduce-warnings-for-include-of-asm-fooh-to-check-from-arch-barc.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: checkpatch: reduce warnings for #include of asm/foo.h to check from arch/bar.c
From: Andy Whitcroft <apw@shadowen.org>
It is much more likely that an architecture file will want to directly
include asm header files. Reduce this WARNING to a CHECK when the
referencing file is in the arch directory.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/checkpatch.pl | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff -puN scripts/checkpatch.pl~checkpatch-reduce-warnings-for-include-of-asm-fooh-to-check-from-arch-barc scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-reduce-warnings-for-include-of-asm-fooh-to-check-from-arch-barc
+++ a/scripts/checkpatch.pl
@@ -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);
+ }
}
}
_
Patches currently in -mm which might be from apw@shadowen.org are
origin.patch
mm-hugetlbc-make-functions-static-use-null-rather-than-0.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-18 23:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-18 23:13 - checkpatch-reduce-warnings-for-include-of-asm-fooh-to-check-from-arch-barc.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.