[2/2] checkpatch.pl: adjust to be used with Freifunk Franken firmware

Submitted by Adrian Schmutzler on Nov. 25, 2019, 2:01 p.m.

Details

Message ID 20191125140155.1511-2-freifunk@adrianschmutzler.de
State New
Headers show

Commit Message

Adrian Schmutzler Nov. 25, 2019, 2:01 p.m.
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 <freifunk@adrianschmutzler.de>
---
 checkpatch.pl | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

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 <apw@uk.ibm.com> (new conditions, test suite)
 # (c) 2008-2010 Andy Whitcroft <apw@canonical.com>
 # (c) 2013 Vasilis Tsiligiannis <acinonyx@openwrt.gr> (adapt for OpenWrt tree)
+# (c) 2019 Adrian Schmutzler <freifunk@adrianschmutzler.de> (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,