From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEBCBC4363C for ; Fri, 2 Oct 2020 15:14:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97638206CA for ; Fri, 2 Oct 2020 15:14:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388288AbgJBPOC (ORCPT ); Fri, 2 Oct 2020 11:14:02 -0400 Received: from smtprelay0214.hostedemail.com ([216.40.44.214]:33604 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388223AbgJBPOC (ORCPT ); Fri, 2 Oct 2020 11:14:02 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 4C7821730842; Fri, 2 Oct 2020 15:14:01 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: water67_2d10638271a5 X-Filterd-Recvd-Size: 2585 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf18.hostedemail.com (Postfix) with ESMTPA; Fri, 2 Oct 2020 15:14:00 +0000 (UTC) Message-ID: Subject: Re: external tool to remove embedded filenames From: Joe Perches To: Bhaskar Chowdhury Cc: Andrew Morton , Andy Whitcroft , LKML , kernelnewbies Date: Fri, 02 Oct 2020 08:13:58 -0700 In-Reply-To: <20201002144936.GA17987@Gentoo> References: <1fd5f9188a14acdca703ca00301ee323de672a8d.camel@perches.com> <20201002144936.GA17987@Gentoo> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ( * removing mentors, I originally meant to send that to mentees ) On Fri, 2020-10-02 at 20:19 +0530, Bhaskar Chowdhury wrote: > On 11:47 Thu 01 Oct 2020, Joe Perches wrote: > > It's rather unnecessary for files to contain their > > path/filename in source code comments. > > > > Here's a trivial little script that can remove > > embedded filenames in c90 style comments from files. > > > > This requires git. [] > > Running it on today's -next gives: > > > > $ perl remove_embedded_filenames.pl > > $ git diff --shortstat > > 2310 files changed, 354 insertions(+), 4239 deletions(-) > > > > It's also possible to give any filename or path > > as an argument to the script > > > > For instance: > > > > $ perl remove_embedded_filenames.pl drivers/net The below was an attachment, it's odd that your mailer quoted it. > > #!/usr/bin/perl -w [] > > if ($modified && !$quiet) { > > print < > Warning: these changes may not be correct. > > > > These changes should be carefully reviewed manually and not combined with > > any functional changes. > > > > Compile, build and test your changes. > > > > You should understand and be responsible for all object changes. > > > > Make sure you read Documentation/SubmittingPatches before sending > > any changes to reviewers, maintainers or mailing lists. > > EOT > > } > > Suggestion.... please take those damn EOT lines out of it No. What's your actual problem with it? It's a tool and it may not be perfect. It merely emits a single message if it removes filenames from files.