From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753484AbdJaOsV (ORCPT ); Tue, 31 Oct 2017 10:48:21 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:35214 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751877AbdJaOsU (ORCPT ); Tue, 31 Oct 2017 10:48:20 -0400 From: Tom Saeger To: Joe Perches Cc: Tom Saeger , Andrew Morton , "David S. Miller" , Greg Kroah-Hartman , Mauro Carvalho Chehab , Randy Dunlap , linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/2] scripts: warn about invalid MAINTAINER patterns Date: Tue, 31 Oct 2017 09:46:11 -0500 Message-Id: X-Mailer: git-send-email 2.14.3 X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series attempts to fix all stale MAINTAINER file "F" and "X" patterns. First patch adds an option "checks" to get_maintainer.pl which outputs warnings for any "F" or "X" pattern found in MAINTAINER file which does not register any file/directory matches known by git in current worktree. Originally, I wrote a standalone script "check_maintainer", but as this duplicated some of the functions found in get_maintainer.pl it seemed to make more sense to change get_maintainer.pl directly. The "-x|--checks" option is intended to be used as follows: ./scripts/get_maintainer.pl -x ./ | tee out.txt ./MAINTAINERS:1743 warning: no matches drivers/.*/pm8...-.* F: drivers/*/pm8???-* ./MAINTAINERS:8721 warning: no matches drivers/net/ethernet/mellanox/mlx5/core/en_ipsec/.* F: drivers/net/ethernet/mellanox/mlx5/core/en_ipsec/* ./MAINTAINERS:8722 warning: no matches drivers/net/ethernet/mellanox/mlx5/core/ipsec.* F: drivers/net/ethernet/mellanox/mlx5/core/ipsec* ./MAINTAINERS:9431 warning: no matches net/core/flow\.c F: net/core/flow.c The output format lends itself to the following in vim (note tab character): set errorformat=%f:%l\ %m cfile out.txt copen Second patch fixes all MAINTAINER warnings but four (those listed above), which were not obvious to me how to fix. Most fixes were obvious, requiring only "ls ./**/*pat*" or "git log --follow -- xyz.c" or "git blame MAINTAINERS" to figure out what needed to be changed. Patches are independent, however I did employ the first in figuring out the second. Looking for input on how best to get these merged. Some of these have been broken for a long time - so stable kernels might benefit from backporting. Future enhancements could sanity check all the other entry types found in MAINTAINER file. --Tom Tom Saeger (2): scripts: warn about invalid MAINTAINER patterns MAINTAINERS: various pattern fixes for mv/rm/typos MAINTAINERS | 107 ++++++++++++++++++---------------------------- scripts/get_maintainer.pl | 65 ++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 65 deletions(-) -- 2.14.3