[coreboot-gerrit] New patch to review for coreboot: 9440888 checkpatch: fine tune checks

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed May 6 20:16:19 CEST 2015


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10123

-gerrit

commit 9440888cfa455244e6ba8608ed7d585d6f19621b
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Wed May 6 11:10:18 2015 -0700

    checkpatch: fine tune checks
    
    Fine tune the following two checks:
    
    - Check for incorrect file permissions
      This one had a linux path hard coded, so it would choke on
      some commits unnecessarily.
    - FILE_PATH_CHANGES seems to not be working correctly. It will
      choke on added / deleted files even if the MAINTAINERS file
      is touched. Hence, switch from WARN to CHK (as WARN currently
      blocks commits as well)
    
    Change-Id: I9fccfbd75e94f420de45cf8b58071e3198065cf3
    Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
 util/lint/checkpatch.pl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl
index c0d3d96..92c356d 100755
--- a/util/lint/checkpatch.pl
+++ b/util/lint/checkpatch.pl
@@ -2069,7 +2069,8 @@ sub process {
 # Check for incorrect file permissions
 		if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
 			my $permhere = $here . "FILE: $realfile\n";
-			if ($realfile !~ m at scripts/@ &&
+			if ($realfile !~ m at util/lint/@ &&
+			    $realfile !~ m at util/scripts/@ &&
 			    $realfile !~ /\.(py|pl|awk|sh)$/) {
 				ERROR("EXECUTE_PERMISSIONS",
 				      "do not set execute permissions for source files\n" . $permhere);
@@ -2194,7 +2195,7 @@ sub process {
 		     ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
 		      (defined($1) || defined($2))))) {
 			$reported_maintainer_file = 1;
-			WARN("FILE_PATH_CHANGES",
+			CHK("FILE_PATH_CHANGES",
 			     "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr);
 		}
 



More information about the coreboot-gerrit mailing list