Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp3777680ooa; Mon, 13 Aug 2018 18:17:49 -0700 (PDT) X-Google-Smtp-Source: AA+uWPynfYv3gnyf89XoBPbvLevc9PdvtIbX18NNVwJL27OoR+JH8Cb9KHK1mdIU+7qAYsW1CR0F X-Received: by 2002:a63:7b1b:: with SMTP id w27-v6mr18276724pgc.199.1534209469410; Mon, 13 Aug 2018 18:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534209469; cv=none; d=google.com; s=arc-20160816; b=qEWf43OGxQdETph95OxU8PzdXABoj7xP3N+Tk00g+3dJ0i65VDiPwi1FwykdECt3LY /QgzXEhJ6BeUWbqilfHl90UE1UuNhzmQ948/9mI4xiYGfexA2hqAfoo3nr7uzvz8Fh/k B7loCTuxCCsSQpMda1jshOVAav4pcxMs/szdZ4ptqx5QYJ4kDveUL3QDszWeVyvaXeNo Wl4RXaw6UnTYSuShkTtG8OMOM+xlCdjzYyJNHhFmn/RVe6XhU+vhEDSn12B555CEgLFE ECImmiDZ6nKK1WFSYHESh9sYUElSqvGABuSWnrKlunKOfnes3CYDGvx3HyrZjen8SSKx jFZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:cc:to:from:subject:message-id:arc-authentication-results; bh=R/npLt7ScxWIR9xOa5XxKsut47MV+2QoCCcXO69j9VQ=; b=IhfJR671Kotxv7Noxz1UtGRBjV/o61HZV/UgAD9kgfv2Zx/HcibTCV16Kuh9EL4EOv QU2WsmBdTceP6E6mFxvPnRCTTazNEi6i/YWKt6oY0mnovo7Caiwmm5P8UDATK+3Iisuq cgONwPVriBdZdxp2mANP2eRjUxEz4z2YECUkzbFxdnV2dgqebvpG07noQXF9i4YGZX1z 90CCD7KRhY2bkxEV0ZqQ2ShQoegKjTc8sH2RKIBNByN+HKhDAbopz9EKBjWpyfIbDxUn VNl9IGt9tl0kHBY1Ef/QUc8kBw3Zz/uBE/4bN4ss2kkf/tDGzEu3Cm1073mQbtIvY6qH aQTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h34-v6si15215381pld.355.2018.08.13.18.17.34; Mon, 13 Aug 2018 18:17:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731057AbeHND5c (ORCPT + 99 others); Mon, 13 Aug 2018 23:57:32 -0400 Received: from smtprelay0245.hostedemail.com ([216.40.44.245]:41064 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729346AbeHND5c (ORCPT ); Mon, 13 Aug 2018 23:57:32 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 03FFD180A8128; Tue, 14 Aug 2018 01:12:47 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1801:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3653:3865:3866:3868:3870:3871:3872:4250:4321:4605:5007:6299:7903:8784:9121:10004:10400:10848:11026:11233:11658:11914:12438:12555:12760:12986:13069:13161:13229:13255:13311:13357:13439:14181:14394:14581:14659:14721:21080:21324:21627:30054,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:31,LUA_SUMMARY:none X-HE-Tag: home33_182dcee706403 X-Filterd-Recvd-Size: 2358 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Tue, 14 Aug 2018 01:12:45 +0000 (UTC) Message-ID: <991b2f20112d53863cd79e61d908f1d26d3e1971.camel@perches.com> Subject: [PATCH] get_maintainer: Allow option --mpath to read all files in From: Joe Perches To: Andrew Morton Cc: Don Zickus , LKML Date: Mon, 13 Aug 2018 18:12:44 -0700 Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is an external use case for multiple private MAINTAINER style files in a separate directory. Allow it. --mpath has a default of "./MAINTAINERS". The value entered can be either a file or a directory. The behaviors are now: --mpath Read only the specific file as file --mpath Read all files in as files --mpath --find-maintainer-files Recurse through and read all files named MAINTAINERS Signed-off-by: Joe Perches --- scripts/get_maintainer.pl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 0ebdefe74d5b..c1c088ef1420 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -396,7 +396,12 @@ sub read_all_maintainer_files { if (-d $path) { $path .= '/' if ($path !~ m@/$@); - if ($path eq "${lk_path}MAINTAINERS/") { + if ($find_maintainer_files) { + find( { wanted => \&find_is_maintainer_file, + preprocess => \&find_ignore_git, + no_chdir => 1, + }, "$path"); + } else { opendir(DIR, "$path") or die $!; my @files = readdir(DIR); closedir(DIR); @@ -404,12 +409,6 @@ sub read_all_maintainer_files { push(@mfiles, "$path$file") if ($file !~ /^\./); } } - if ($find_maintainer_files) { - find( { wanted => \&find_is_maintainer_file, - preprocess => \&find_ignore_git, - no_chdir => 1, - }, "$path"); - } } elsif (-f "$path") { push(@mfiles, "$path"); } else {