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

From: Jeff Kirsher
Date: Tue Nov 08 2016 - 16:41:02 EST


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@xxxxxxxxx>
> ---
> Â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: signature.asc
Description: This is a digitally signed message part