diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl index 9ca667bcaee95024750d8fdc4febad2f8d5f6d76..594c55541b1623aacb78eb986356f14383502157 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 381c018a461297881c4c704c0a71854bb87b65b4..ce9edefd6e0be32ca34b26cb47f61d35a3a2fa9d 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 4b9569fa931b90200a2c809598fe3765b157fbb7..3465a7c5a154899dce70459fd9eee56132e6808a 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 (the ugly bit) # (c) 2007,2008, Andy Whitcroft (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 9d37aa4faf5ce8ce2719c71921ee7ab0eabc22a1..7f4c41717e265e608483304983e71e01237517ef 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 5e490a8ceca5582e3003890cf34a21c33447969f..8b4f205234b539b71e748f925b6a8f1254935795 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 , or cases of diff --git a/scripts/cleanfile b/scripts/cleanfile index cefd29e5229880ce1dfb5b6ef64be1393b34380a..72e3755327ae0563d07224ba12b8d24347a08d11 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 9680d03ad2b8e5dfb23b45079999382abba3fe85..3e5a2303dc0e744508804a3b136e0ba681cc9436 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 9a248b505c58572e8012808fba6d5b4bdf494c85..5dfd1bff351f764e3c686df7edb6f6661203f59f 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 8f79b701de876a807ae76abd89ad077d65ef3390..68ff426b347c7f0e7bc1d15659b69a77d7b4727d 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 faac6f2e377fac754d32f017444cd2c96dd45b07..0f161ea4126157fd673d755570b107e67357135a 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 # @@ -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 8227ca10a4942b688aacd3ef64e3f8ad7ec9b33e..2aa873b944e0a5666868c91760b4d9829006e759 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 47877deae6d7f60fe790bb4873df8f649162b691..61d9b256c6581b34f269a5a8dbf880ade359503f 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 # Released under GPLv2 diff --git a/scripts/get_dvb_firmware b/scripts/get_dvb_firmware index 1a0a04125f713cb586549e1f5315501447eb65de..f3f230225aba0ab955e315573dd8866eafcbe54e 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 633f2dd3de279fda4799ca41ba88553e1c963961..3bd5f4f302354cf8cecd78ae0ab13b9b3bf130ef 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 # 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 8dd019bc5a7361631c71dc1d5e33095b6f42b6a1..86ebb9ee7570782c565d728becb97b66f6c4ffc0 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 diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index 8b2da054cdc30a0ddeaf1d59dee73d220083d57c..3091e4ee6ee1329d6224266ae788f4776f8fe073 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 b8c7b29affc59d4da88998a7fd379f6307dc64af..a2e83ab17de3cc2c4c5a15f06b8c0f0eecc4ed99 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 a26a5f2dce39431497bd430ab605dd061c98009c..7b0a8f01fed5af3c07589c166d78ea442e3cab73 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 104a5a5ba2c8e2bc2c1fa3792818c10cc5c8d90a..e3b24bfc804c3681d5b774bf4c023a4360e2487c 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 c21d16328d3f2bae0ccaba40029a7e1f83229b6a..70dcfb6b3de1cb4d2a8e4093f0513ed4fafb0250 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 9f3c9d47a4a5d89c4e95de825f67d84b0258f0df..729c547fc9e1ef54400db1f06e5cf98c592bf290 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 6943fa7cc95b646d9f1a10752cf2577f4b1a2185..f23d7be943948df09dd037b9679c9cf0de5c6873 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 1633c3e6c0b95af1933339b195b2f68527c639d8..2033af758173c7c02ed02b77b8c8686a43201ad6 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 # 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 48eabf2f48f85212bd5202c40ca6eab530b285a3..20a79f19a111d7ad319c91c3f53d105524530619 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.