linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] checkpatch: Fix warnings when --no-tree is used
@ 2016-10-21 20:27 Jeff Kirsher
  2016-11-08 21:40 ` Jeff Kirsher
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Kirsher @ 2016-10-21 20:27 UTC (permalink / raw)
  To: apw, joe; +Cc: Jeff Kirsher, linux-kernel

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] checkpatch: Fix warnings when --no-tree is used
  2016-10-21 20:27 [PATCH] checkpatch: Fix warnings when --no-tree is used Jeff Kirsher
@ 2016-11-08 21:40 ` Jeff Kirsher
  2016-11-09  1:00   ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Kirsher @ 2016-11-08 21:40 UTC (permalink / raw)
  To: apw, joe; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

On Fri, 2016-10-21 at 13:27 -0700, Jeff Kirsher wrote:
> 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(-)

Ping? Joe? Andy?  Where are we at with this patch?

> 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");

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] checkpatch: Fix warnings when --no-tree is used
  2016-11-08 21:40 ` Jeff Kirsher
@ 2016-11-09  1:00   ` Joe Perches
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2016-11-09  1:00 UTC (permalink / raw)
  To: Jeff Kirsher, apw; +Cc: linux-kernel

On Tue, 2016-11-08 at 13:40 -0800, Jeff Kirsher wrote:
> Ping? Joe? Andy?  Where are we at with this patch?

I think there's a patch in Andrew Morton's queue for this.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-09  1:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-21 20:27 [PATCH] checkpatch: Fix warnings when --no-tree is used Jeff Kirsher
2016-11-08 21:40 ` Jeff Kirsher
2016-11-09  1:00   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).