summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-02-11 01:51:32 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-03-24 23:35:28 +0100
commit42412b603c2e4723e777be582d5e1095ba84efde (patch)
treed77cad6cf7fdfd7f8744f8e2c39c897e6e632839
parent12d45b2f8a6c10d68ab940c24b7f68d5a6fbb378 (diff)
downloadcoreboot-42412b603c2e4723e777be582d5e1095ba84efde.tar.xz
checkpatch: Fix running out of coreboot's tree
* Fix up tree detection to work in a coreboot tree * Switch C99_COMMENT from ERR to CHK Change-Id: Ie8d6d1407853b77a4b3e9763f23481bd9402bc61 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/8418 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rwxr-xr-xutil/lint/checkpatch.pl9
1 files changed, 4 insertions, 5 deletions
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl
index f0bb6d60c0..c0d3d96b07 100755
--- a/util/lint/checkpatch.pl
+++ b/util/lint/checkpatch.pl
@@ -226,7 +226,7 @@ if ($tree) {
} else {
if (top_of_kernel_tree('.')) {
$root = '.';
- } elsif ($0 =~ m@(.*)/scripts/[^/]*$@ &&
+ } elsif ($0 =~ m@(.*)/util/lint/[^/]*$@ &&
top_of_kernel_tree($1)) {
$root = $1;
}
@@ -699,9 +699,8 @@ sub top_of_kernel_tree {
my ($root) = @_;
my @tree_check = (
- "COPYING", "CREDITS", "Kbuild", "MAINTAINERS", "Makefile",
- "README", "Documentation", "arch", "include", "drivers",
- "fs", "init", "ipc", "kernel", "lib", "scripts",
+ "COPYING", "README", "Makefile", "Makefile.inc",
+ "src", "documentation", "util", "payloads",
);
foreach my $check (@tree_check) {
@@ -2994,7 +2993,7 @@ sub process {
# no C99 // comments
if ($line =~ m{//}) {
- if (ERROR("C99_COMMENTS",
+ if (CHK("C99_COMMENTS",
"do not use C99 // comments\n" . $herecurr) &&
$fix) {
my $line = $fixed[$fixlinenr];