diff options
| author | Kamil Rytarowski <n54@gmx.com> | 2017-05-07 23:25:26 +0200 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-05-14 11:20:44 +0900 |
| commit | cb77f0d623ff33a7899cb945f4f5a4825fbb2ea1 (patch) | |
| tree | 4de662eee07903e11e20750f15e134a34928d5b6 /scripts | |
| parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
| download | linux-cb77f0d623ff33a7899cb945f4f5a4825fbb2ea1.tar.gz | |
scripts: Switch to more portable Perl shebang
The default NetBSD package manager is pkgsrc and it installs Perl
along other third party programs under custom and configurable prefix.
The default prefix for binary prebuilt packages is /usr/pkg, and the
Perl executable lands in /usr/pkg/bin/perl.
This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
the most portable solution that should work for almost everybody.
Perl's executable is detected automatically.
This change switches -w option passed to the executable with more
modern "use warnings;" approach. There is no functional change to the
default behavior.
While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).
Signed-off-by: Kamil Rytarowski <n54@gmx.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/bootgraph.pl | 2 | ||||
| -rwxr-xr-x | scripts/checkincludes.pl | 2 | ||||
| -rwxr-xr-x | scripts/checkpatch.pl | 3 | ||||
| -rwxr-xr-x | scripts/checkstack.pl | 2 | ||||
| -rwxr-xr-x | scripts/checkversion.pl | 2 | ||||
| -rwxr-xr-x | scripts/cleanfile | 3 | ||||
| -rwxr-xr-x | scripts/cleanpatch | 3 | ||||
| -rwxr-xr-x | scripts/dtc/dt_to_config | 2 | ||||
| -rwxr-xr-x | scripts/export_report.pl | 3 | ||||
| -rwxr-xr-x | scripts/extract-module-sig.pl | 3 | ||||
| -rwxr-xr-x | scripts/extract-sys-certs.pl | 3 | ||||
| -rwxr-xr-x | scripts/extract_xc3028.pl | 2 | ||||
| -rwxr-xr-x | scripts/get_dvb_firmware | 2 | ||||
| -rwxr-xr-x | scripts/get_maintainer.pl | 3 | ||||
| -rwxr-xr-x | scripts/headerdep.pl | 2 | ||||
| -rwxr-xr-x | scripts/headers_check.pl | 3 | ||||
| -rwxr-xr-x | scripts/kconfig/streamline_config.pl | 3 | ||||
| -rwxr-xr-x | scripts/kernel-doc | 3 | ||||
| -rwxr-xr-x | scripts/kernel-doc-xml-ref | 3 | ||||
| -rwxr-xr-x | scripts/markup_oops.pl | 2 | ||||
| -rwxr-xr-x | scripts/namespace.pl | 4 | ||||
| -rwxr-xr-x | scripts/profile2linkerlist.pl | 2 | ||||
| -rwxr-xr-x | scripts/recordmcount.pl | 3 | ||||
| -rwxr-xr-x | scripts/stackdelta | 2 |
24 files changed, 37 insertions, 25 deletions
diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl index 9ca667bcaee950..594c55541b1623 100755 --- a/scripts/bootgraph.pl +++ b/scripts/bootgraph.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Copyright 2008, Intel Corporation # diff --git a/scripts/checkincludes.pl b/scripts/checkincludes.pl index 381c018a461297..ce9edefd6e0be3 100755 --- a/scripts/checkincludes.pl +++ b/scripts/checkincludes.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # # checkincludes: find/remove files included more than once # diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 4b9569fa931b90..3465a7c5a15489 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # (c) 2001, Dave Jones. (the file handling bit) # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit) # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite) @@ -6,6 +6,7 @@ # Licensed under the terms of the GNU GPL License version 2 use strict; +use warnings; use POSIX; use File::Basename; use Cwd 'abs_path'; diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index 9d37aa4faf5ce8..7f4c41717e265e 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Check the stack usage of functions # diff --git a/scripts/checkversion.pl b/scripts/checkversion.pl index 5e490a8ceca558..8b4f205234b539 100755 --- a/scripts/checkversion.pl +++ b/scripts/checkversion.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#! /usr/bin/env perl # # checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION # without including <linux/version.h>, or cases of diff --git a/scripts/cleanfile b/scripts/cleanfile index cefd29e5229880..72e3755327ae05 100755 --- a/scripts/cleanfile +++ b/scripts/cleanfile @@ -1,9 +1,10 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # Clean a text file -- or directory of text files -- of stealth whitespace. # WARNING: this can be a highly destructive operation. Use with caution. # +use warnings; use bytes; use File::Basename; diff --git a/scripts/cleanpatch b/scripts/cleanpatch index 9680d03ad2b8e5..3e5a2303dc0e74 100755 --- a/scripts/cleanpatch +++ b/scripts/cleanpatch @@ -1,9 +1,10 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # Clean a patch file -- or directory of patch files -- of stealth whitespace. # WARNING: this can be a highly destructive operation. Use with caution. # +use warnings; use bytes; use File::Basename; diff --git a/scripts/dtc/dt_to_config b/scripts/dtc/dt_to_config index 9a248b505c5857..5dfd1bff351f76 100755 --- a/scripts/dtc/dt_to_config +++ b/scripts/dtc/dt_to_config @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Copyright 2016 by Frank Rowand # Copyright 2016 by Gaurav Minocha diff --git a/scripts/export_report.pl b/scripts/export_report.pl index 8f79b701de876a..68ff426b347c7f 100755 --- a/scripts/export_report.pl +++ b/scripts/export_report.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # (C) Copyright IBM Corporation 2006. # Released under GPL v2. @@ -7,6 +7,7 @@ # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c # +use warnings; use Getopt::Std; use strict; diff --git a/scripts/extract-module-sig.pl b/scripts/extract-module-sig.pl index faac6f2e377fac..0f161ea4126157 100755 --- a/scripts/extract-module-sig.pl +++ b/scripts/extract-module-sig.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # extract-mod-sig <part> <module-file> # @@ -12,6 +12,7 @@ # -k: Just the key ID # -s: Just the crypto signature or PKCS#7 message # +use warnings; use strict; die "Format: $0 -[0adnks] module-file >out\n" diff --git a/scripts/extract-sys-certs.pl b/scripts/extract-sys-certs.pl index 8227ca10a4942b..2aa873b944e0a5 100755 --- a/scripts/extract-sys-certs.pl +++ b/scripts/extract-sys-certs.pl @@ -1,5 +1,6 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # +use warnings; use strict; use Math::BigInt; use Fcntl "SEEK_SET"; diff --git a/scripts/extract_xc3028.pl b/scripts/extract_xc3028.pl index 47877deae6d7f6..61d9b256c6581b 100755 --- a/scripts/extract_xc3028.pl +++ b/scripts/extract_xc3028.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Copyright (c) Mauro Carvalho Chehab <mchehab@infradead.org> # Released under GPLv2 diff --git a/scripts/get_dvb_firmware b/scripts/get_dvb_firmware index 1a0a04125f713c..f3f230225aba0a 100755 --- a/scripts/get_dvb_firmware +++ b/scripts/get_dvb_firmware @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # DVB firmware extractor # # (c) 2004 Andrew de Quincey diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 633f2dd3de279f..3bd5f4f302354c 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # (c) 2007, Joe Perches <joe@perches.com> # created from checkpatch.pl # @@ -10,6 +10,7 @@ # # Licensed under the terms of the GNU GPL License version 2 +use warnings; use strict; my $P = $0; diff --git a/scripts/headerdep.pl b/scripts/headerdep.pl index 8dd019bc5a7361..86ebb9ee757078 100755 --- a/scripts/headerdep.pl +++ b/scripts/headerdep.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#! /usr/bin/env perl # # Detect cycles in the header file dependency graph # Vegard Nossum <vegardno@ifi.uio.no> diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index 8b2da054cdc30a..3091e4ee6ee132 100755 --- a/scripts/headers_check.pl +++ b/scripts/headers_check.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # headers_check.pl execute a number of trivial consistency checks # @@ -18,6 +18,7 @@ # # 3) Check for leaked CONFIG_ symbols +use warnings; use strict; use File::Basename; diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index b8c7b29affc59d..a2e83ab17de3cc 100755 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # Copyright 2005-2009 - Steven Rostedt # Licensed under the terms of the GNU GPL License version 2 @@ -42,6 +42,7 @@ # mv config_strip .config # make oldconfig # +use warnings; use strict; use Getopt::Long; diff --git a/scripts/kernel-doc b/scripts/kernel-doc index a26a5f2dce3943..7b0a8f01fed5af 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1,5 +1,6 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl +use warnings; use strict; ## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## diff --git a/scripts/kernel-doc-xml-ref b/scripts/kernel-doc-xml-ref index 104a5a5ba2c8e2..e3b24bfc804c36 100755 --- a/scripts/kernel-doc-xml-ref +++ b/scripts/kernel-doc-xml-ref @@ -1,5 +1,6 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl +use warnings; use strict; ## Copyright (C) 2015 Intel Corporation ## diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl index c21d16328d3f2b..70dcfb6b3de1cb 100755 --- a/scripts/markup_oops.pl +++ b/scripts/markup_oops.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use File::Basename; use Math::BigInt; diff --git a/scripts/namespace.pl b/scripts/namespace.pl index 9f3c9d47a4a5d8..729c547fc9e1ef 100755 --- a/scripts/namespace.pl +++ b/scripts/namespace.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # namespace.pl. Mon Aug 30 2004 # @@ -62,7 +62,7 @@ # result. # -require 5; # at least perl 5 +use warnings; use strict; use File::Find; diff --git a/scripts/profile2linkerlist.pl b/scripts/profile2linkerlist.pl index 6943fa7cc95b64..f23d7be943948d 100755 --- a/scripts/profile2linkerlist.pl +++ b/scripts/profile2linkerlist.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # # Takes a (sorted) output of readprofile and turns it into a list suitable for diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index 1633c3e6c0b95a..2033af758173c7 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # (c) 2008, Steven Rostedt <srostedt@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # @@ -106,6 +106,7 @@ # 9) Move the result back to the original object. # +use warnings; use strict; my $P = $0; diff --git a/scripts/stackdelta b/scripts/stackdelta index 48eabf2f48f852..20a79f19a111d7 100755 --- a/scripts/stackdelta +++ b/scripts/stackdelta @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Read two files produced by the stackusage script, and show the # delta between them. |
