Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1506265 > unrolled thread

[PATCH] checkpatch: Fix warnings when --no-tree is used

Started byJeff Kirsher <jeffrey.t.kirsher@intel.com>
First post2016-10-21 22:30 +0200
Last post2016-10-21 22:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] checkpatch: Fix warnings when --no-tree is used Jeff Kirsher <jeffrey.t.kirsher@intel.com> - 2016-10-21 22:30 +0200

#1506265 — [PATCH] checkpatch: Fix warnings when --no-tree is used

FromJeff Kirsher <jeffrey.t.kirsher@intel.com>
Date2016-10-21 22:30 +0200
Subject[PATCH] checkpatch: Fix warnings when --no-tree is used
Message-ID<suOBY-2ad-7@gated-at.bofh.it>
When users run checkpatch.pl with --no-tree option, $root is not
defined, which causes an ugly warning that it is not initialized at
line 764.  The test for whether or not a file is maintained should
only be run when a kernel tree is defined (i.e. not when --no-tree
option is being used)

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a8368d1..7a54978 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2352,7 +2352,7 @@ sub process {
 			}
 		}
 
-		if ($found_file) {
+		if ($found_file && $tree) {
 			if (is_maintained_obsolete($realfile)) {
 				WARN("OBSOLETE",
 				     "$realfile is marked as 'obsolete' in the MAINTAINERS hierarchy.  No unnecessary modifications please.\n");
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web