From patchwork Mon Nov 25 14:01:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] checkpatch.pl: adjust to be used with Freifunk Franken firmware From: Adrian Schmutzler X-Patchwork-Id: 1231 Message-Id: <20191125140155.1511-2-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Mon, 25 Nov 2019 15:01:55 +0100 While checkpatch.pl is meant to be run in OpenWrt root directory, is already provides options for when this is not the case. This patch alters these options so out-of-tree is default, and in-tree variant cannot be enabled as it's useless for us. As we do not have to check kernel patches etc. for our firmware directly this does not pose a problem. While one technically could remove the unused parts of the code, this patch keeps them and only changes the relevant variables. This should provide easy updates in case of upstream changes. Signed-off-by: Adrian Schmutzler --- checkpatch.pl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/checkpatch.pl b/checkpatch.pl index 5224ea49..49f3b9fe 100755 --- a/checkpatch.pl +++ b/checkpatch.pl @@ -4,6 +4,7 @@ # (c) 2007,2008, Andy Whitcroft (new conditions, test suite) # (c) 2008-2010 Andy Whitcroft # (c) 2013 Vasilis Tsiligiannis (adapt for OpenWrt tree) +# (c) 2019 Adrian Schmutzler (adapt for FFF) # Licensed under the terms of the GNU GPL License version 2 use strict; @@ -17,7 +18,7 @@ my $V = '0.32-openwrt'; use Getopt::Long qw(:config no_auto_abbrev); my $quiet = 0; -my $tree = 1; +my $tree = 0; my $chk_signoff = 1; my $chk_patch = 1; my $tst_only; @@ -45,7 +46,6 @@ Version: $V Options: -q, --quiet quiet - --no-tree run without a kernel tree --no-signoff do not check for 'Signed-off-by' line --patch treat FILE as patchfile (default) --emacs emacs compile window format @@ -54,7 +54,6 @@ Options: --subjective, --strict enable more subjective tests --ignore TYPE(,TYPE2...) ignore various comma separated message types --show-types show the message "types" in the output - --root=PATH PATH to the kernel tree root --no-summary suppress the per-file summary --mailback only produce a report in case of warnings/errors --summary-file include the filename in summary @@ -99,7 +98,6 @@ if (-f $conf) { GetOptions( 'q|quiet+' => \$quiet, - 'tree!' => \$tree, 'signoff!' => \$chk_signoff, 'patch!' => \$chk_patch, 'emacs!' => \$emacs, @@ -109,7 +107,6 @@ GetOptions( 'strict!' => \$check, 'ignore=s' => \@ignore, 'show-types!' => \$show_types, - 'root=s' => \$root, 'summary!' => \$summary, 'mailback!' => \$mailback, 'summary-file!' => \$summary_file,