From patchwork Mon Aug 22 18:17:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 9294061 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A568A607F0 for ; Mon, 22 Aug 2016 18:18:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A4D32882E for ; Mon, 22 Aug 2016 18:18:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AA4028871; Mon, 22 Aug 2016 18:18:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E9252882E for ; Mon, 22 Aug 2016 18:18:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753509AbcHVSRk (ORCPT ); Mon, 22 Aug 2016 14:17:40 -0400 Received: from smtprelay0120.hostedemail.com ([216.40.44.120]:52433 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751284AbcHVSRi (ORCPT ); Mon, 22 Aug 2016 14:17:38 -0400 Received: from filter.hostedemail.com (unknown [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 5DF23235FC; Mon, 22 Aug 2016 18:17:23 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: place04_7a7299a25742a X-Filterd-Recvd-Size: 2251 Received: from joe-laptop.perches.com (unknown [96.251.125.34]) (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA; Mon, 22 Aug 2016 18:17:21 +0000 (UTC) From: Joe Perches To: Andrew Morton , Kalle Valo , Arend van Spriel , Andy Whitcroft Cc: SF Markus Elfring , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Jouni Malinen , kernel-janitors@vger.kernel.org, Julia Lawall , linux-kernel@vger.kernel.org Subject: [PATCH] checkpatch: See if modified files are marked obsolete in MAINTAINERS Date: Mon, 22 Aug 2016 11:17:20 -0700 Message-Id: <7ceaa510dc9d2df05ec4b456baed7bb1415550b3.1471889575.git.joe@perches.com> X-Mailer: git-send-email 2.8.0.rc4.16.g56331f8 In-Reply-To: <87shtwvm63.fsf@kamboji.qca.qualcomm.com> References: <87shtwvm63.fsf@kamboji.qca.qualcomm.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use get_maintainer to check the status of individual files. If "obsolete", suggest leaving the files alone. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 4de3cc4..df5e9d9 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -704,6 +704,16 @@ sub seed_camelcase_file { } } +sub is_maintained_obsolete { + my ($filename) = @_; + + return 0 if (!(-e "$root/scripts/get_maintainer.pl")); + + my $status = `perl $root/scripts/get_maintainer.pl --status --nom --nol --nogit --nogit-fallback $filename 2>&1`; + + return $status =~ /obsolete/i; +} + my $camelcase_seeded = 0; sub seed_camelcase_includes { return if ($camelcase_seeded); @@ -2289,6 +2299,10 @@ sub process { } if ($found_file) { + if (is_maintained_obsolete($realfile)) { + WARN("OBSOLETE", + "$realfile is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please.\n"); + } if ($realfile =~ m@^(?:drivers/net/|net/|drivers/staging/)@) { $check = 1; } else {