aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include8
-rwxr-xr-xscripts/adjust_autoksyms.sh4
-rwxr-xr-xscripts/bootgraph.pl16
-rwxr-xr-xscripts/checkkconfigsymbols.py2
-rwxr-xr-xscripts/checkstack.pl2
-rw-r--r--scripts/coccinelle/api/alloc/alloc_cast.cocci5
-rw-r--r--scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci3
-rw-r--r--scripts/coccinelle/api/alloc/zalloc-simple.cocci7
-rw-r--r--scripts/coccinelle/api/check_bq27xxx_data.cocci3
-rw-r--r--scripts/coccinelle/api/err_cast.cocci7
-rw-r--r--scripts/coccinelle/api/kstrdup.cocci7
-rw-r--r--scripts/coccinelle/api/memdup.cocci7
-rw-r--r--scripts/coccinelle/api/memdup_user.cocci7
-rw-r--r--scripts/coccinelle/api/platform_no_drv_owner.cocci3
-rw-r--r--scripts/coccinelle/api/pm_runtime.cocci3
-rw-r--r--scripts/coccinelle/api/ptr_ret.cocci5
-rw-r--r--scripts/coccinelle/api/resource_size.cocci7
-rw-r--r--scripts/coccinelle/free/clk_put.cocci5
-rw-r--r--scripts/coccinelle/free/devm_free.cocci5
-rw-r--r--scripts/coccinelle/free/ifnullfree.cocci3
-rw-r--r--scripts/coccinelle/free/iounmap.cocci5
-rw-r--r--scripts/coccinelle/free/kfree.cocci7
-rw-r--r--scripts/coccinelle/free/kfreeaddr.cocci3
-rw-r--r--scripts/coccinelle/free/pci_free_consistent.cocci3
-rw-r--r--scripts/coccinelle/iterators/device_node_continue.cocci3
-rw-r--r--scripts/coccinelle/iterators/fen.cocci7
-rw-r--r--scripts/coccinelle/iterators/itnull.cocci7
-rw-r--r--scripts/coccinelle/iterators/list_entry_update.cocci7
-rw-r--r--scripts/coccinelle/iterators/use_after_iter.cocci5
-rw-r--r--scripts/coccinelle/locks/call_kern.cocci7
-rw-r--r--scripts/coccinelle/locks/double_lock.cocci7
-rw-r--r--scripts/coccinelle/locks/flags.cocci7
-rw-r--r--scripts/coccinelle/locks/mini_lock.cocci7
-rw-r--r--scripts/coccinelle/misc/array_size.cocci3
-rw-r--r--scripts/coccinelle/misc/badty.cocci3
-rw-r--r--scripts/coccinelle/misc/boolconv.cocci3
-rw-r--r--scripts/coccinelle/misc/boolinit.cocci5
-rw-r--r--scripts/coccinelle/misc/bugon.cocci3
-rw-r--r--scripts/coccinelle/misc/cond_no_effect.cocci3
-rw-r--r--scripts/coccinelle/misc/cstptr.cocci5
-rw-r--r--scripts/coccinelle/misc/doubleinit.cocci7
-rw-r--r--scripts/coccinelle/misc/ifaddr.cocci5
-rw-r--r--scripts/coccinelle/misc/ifcol.cocci7
-rw-r--r--scripts/coccinelle/misc/noderef.cocci5
-rw-r--r--scripts/coccinelle/misc/orplus.cocci5
-rw-r--r--scripts/coccinelle/misc/returnvar.cocci3
-rw-r--r--scripts/coccinelle/misc/semicolon.cocci3
-rw-r--r--scripts/coccinelle/misc/warn.cocci5
-rw-r--r--scripts/coccinelle/null/badzero.cocci5
-rw-r--r--scripts/coccinelle/null/deref_null.cocci7
-rw-r--r--scripts/coccinelle/null/eno.cocci7
-rw-r--r--scripts/coccinelle/null/kmerr.cocci7
-rw-r--r--scripts/coccinelle/tests/doublebitand.cocci7
-rw-r--r--scripts/coccinelle/tests/doubletest.cocci7
-rw-r--r--scripts/coccinelle/tests/odd_ptr_err.cocci5
-rw-r--r--scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci3
-rwxr-xr-xscripts/decode_stacktrace.sh2
-rw-r--r--scripts/dtc/checks.c17
-rw-r--r--scripts/dtc/data.c17
-rwxr-xr-xscripts/dtc/dt_to_config3
-rw-r--r--scripts/dtc/dtc.c17
-rw-r--r--scripts/dtc/dtc.h17
-rwxr-xr-xscripts/dtc/dtx_diff4
-rw-r--r--scripts/dtc/fdtget.c16
-rw-r--r--scripts/dtc/fdtput.c16
-rw-r--r--scripts/dtc/flattree.c17
-rw-r--r--scripts/dtc/fstree.c17
-rw-r--r--scripts/dtc/livetree.c17
-rw-r--r--scripts/dtc/srcpos.c16
-rw-r--r--scripts/dtc/srcpos.h16
-rw-r--r--scripts/dtc/treesource.c17
-rw-r--r--scripts/dtc/util.c16
-rw-r--r--scripts/dtc/util.h16
-rw-r--r--scripts/dtc/yamltree.c16
-rwxr-xr-xscripts/export_report.pl2
-rwxr-xr-xscripts/extract-vmlinux2
-rwxr-xr-xscripts/extract_xc3028.pl2
-rw-r--r--scripts/gcc-plugins/gcc-common.h4
-rw-r--r--scripts/gdb/linux/constants.py.in3
-rw-r--r--scripts/genksyms/genksyms.c15
-rw-r--r--scripts/genksyms/genksyms.h15
-rwxr-xr-xscripts/gfp-translate2
-rw-r--r--scripts/kconfig/tests/err_recursive_inc/expected_stderr6
-rwxr-xr-xscripts/leaking_addresses.pl2
-rwxr-xr-xscripts/markup_oops.pl5
-rwxr-xr-xscripts/objdiff2
-rw-r--r--scripts/package/Makefile2
-rw-r--r--scripts/recordmcount.c2
-rw-r--r--scripts/recordmcount.h3
-rwxr-xr-xscripts/recordmcount.pl2
-rw-r--r--scripts/selinux/mdp/mdp.c15
-rwxr-xr-xscripts/show_delta2
-rw-r--r--scripts/sortextable.c2
-rw-r--r--scripts/sortextable.h4
-rwxr-xr-xscripts/spdxcheck.py7
-rwxr-xr-xscripts/sphinx-pre-install96
-rwxr-xr-xscripts/tracing/draw_functrace.py2
97 files changed, 300 insertions, 451 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index e2de6c4dce90..f641bb0aa63f 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0
1#### 2####
2# kbuild: Generic definitions 3# kbuild: Generic definitions
3 4
@@ -73,8 +74,13 @@ endef
73# Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) 74# Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-)
74# Return first <prefix> where a <prefix>gcc is found in PATH. 75# Return first <prefix> where a <prefix>gcc is found in PATH.
75# If no gcc found in PATH with listed prefixes return nothing 76# If no gcc found in PATH with listed prefixes return nothing
77#
78# Note: '2>/dev/null' is here to force Make to invoke a shell. Otherwise, it
79# would try to directly execute the shell builtin 'command'. This workaround
80# should be kept for a long time since this issue was fixed only after the
81# GNU Make 4.2.1 release.
76cc-cross-prefix = $(firstword $(foreach c, $(filter-out -%, $(1)), \ 82cc-cross-prefix = $(firstword $(foreach c, $(filter-out -%, $(1)), \
77 $(if $(shell which $(c)gcc), $(c)))) 83 $(if $(shell command -v $(c)gcc 2>/dev/null), $(c))))
78 84
79# output directory for tests below 85# output directory for tests below
80TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) 86TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh
index 84bf6b500815..aab4e299d7a2 100755
--- a/scripts/adjust_autoksyms.sh
+++ b/scripts/adjust_autoksyms.sh
@@ -1,13 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-only
2 3
3# Script to create/update include/generated/autoksyms.h and dependency files 4# Script to create/update include/generated/autoksyms.h and dependency files
4# 5#
5# Copyright: (C) 2016 Linaro Limited 6# Copyright: (C) 2016 Linaro Limited
6# Created by: Nicolas Pitre, January 2016 7# Created by: Nicolas Pitre, January 2016
7# 8#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License version 2 as
10# published by the Free Software Foundation.
11 9
12# Create/update the include/generated/autoksyms.h file from the list 10# Create/update the include/generated/autoksyms.h file from the list
13# of all module's needed symbols as recorded on the third line of 11# of all module's needed symbols as recorded on the third line of
diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl
index 594c55541b16..79c903292ae8 100755
--- a/scripts/bootgraph.pl
+++ b/scripts/bootgraph.pl
@@ -1,24 +1,10 @@
1#!/usr/bin/env perl 1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0-only
2 3
3# Copyright 2008, Intel Corporation 4# Copyright 2008, Intel Corporation
4# 5#
5# This file is part of the Linux kernel 6# This file is part of the Linux kernel
6# 7#
7# This program file is free software; you can redistribute it and/or modify it
8# under the terms of the GNU General Public License as published by the
9# Free Software Foundation; version 2 of the License.
10#
11# This program is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program in a file named COPYING; if not, write to the
18# Free Software Foundation, Inc.,
19# 51 Franklin Street, Fifth Floor,
20# Boston, MA 02110-1301 USA
21#
22# Authors: 8# Authors:
23# Arjan van de Ven <arjan@linux.intel.com> 9# Arjan van de Ven <arjan@linux.intel.com>
24 10
diff --git a/scripts/checkkconfigsymbols.py b/scripts/checkkconfigsymbols.py
index 8cd16c65d3c5..00a10a293f4f 100755
--- a/scripts/checkkconfigsymbols.py
+++ b/scripts/checkkconfigsymbols.py
@@ -1,11 +1,11 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# SPDX-License-Identifier: GPL-2.0-only
2 3
3"""Find Kconfig symbols that are referenced but not defined.""" 4"""Find Kconfig symbols that are referenced but not defined."""
4 5
5# (c) 2014-2017 Valentin Rothberg <valentinrothberg@gmail.com> 6# (c) 2014-2017 Valentin Rothberg <valentinrothberg@gmail.com>
6# (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> 7# (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de>
7# 8#
8# Licensed under the terms of the GNU GPL License version 2
9 9
10 10
11import argparse 11import argparse
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index 122aef5e4e14..371bd17a4983 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -46,7 +46,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
46 $x = "[0-9a-f]"; # hex character 46 $x = "[0-9a-f]"; # hex character
47 $xs = "[0-9a-f ]"; # hex character or space 47 $xs = "[0-9a-f ]"; # hex character or space
48 $funcre = qr/^$x* <(.*)>:$/; 48 $funcre = qr/^$x* <(.*)>:$/;
49 if ($arch eq 'aarch64') { 49 if ($arch =~ '^(aarch|arm)64$') {
50 #ffffffc0006325cc: a9bb7bfd stp x29, x30, [sp, #-80]! 50 #ffffffc0006325cc: a9bb7bfd stp x29, x30, [sp, #-80]!
51 #a110: d11643ff sub sp, sp, #0x590 51 #a110: d11643ff sub sp, sp, #0x590
52 $re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o; 52 $re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o;
diff --git a/scripts/coccinelle/api/alloc/alloc_cast.cocci b/scripts/coccinelle/api/alloc/alloc_cast.cocci
index 18fedf7c60ed..f6f0ccdb6409 100644
--- a/scripts/coccinelle/api/alloc/alloc_cast.cocci
+++ b/scripts/coccinelle/api/alloc/alloc_cast.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Remove casting the values returned by memory allocation functions 2/// Remove casting the values returned by memory allocation functions
2/// like kmalloc, kzalloc, kmem_cache_alloc, kmem_cache_zalloc etc. 3/// like kmalloc, kzalloc, kmem_cache_alloc, kmem_cache_zalloc etc.
3/// 4///
@@ -8,8 +9,8 @@
8//# need some reformatting. 9//# need some reformatting.
9// 10//
10// Confidence: High 11// Confidence: High
11// Copyright: (C) 2014 Himangi Saraogi GPLv2. 12// Copyright: (C) 2014 Himangi Saraogi
12// Copyright: (C) 2017 Himanshu Jha GPLv2. 13// Copyright: (C) 2017 Himanshu Jha
13// Comments: 14// Comments:
14// Options: --no-includes --include-headers 15// Options: --no-includes --include-headers
15// 16//
diff --git a/scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci b/scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci
index 9b7eb321a025..9c61a23b34db 100644
--- a/scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci
+++ b/scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci
@@ -1,7 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// 2///
2/// Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0 3/// Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0
3/// 4///
4// Copyright: (C) 2015 Intel Corp. GPLv2. 5// Copyright: (C) 2015 Intel Corp.
5// Options: --no-includes --include-headers 6// Options: --no-includes --include-headers
6// 7//
7// Keywords: dma_pool_zalloc, pci_pool_zalloc 8// Keywords: dma_pool_zalloc, pci_pool_zalloc
diff --git a/scripts/coccinelle/api/alloc/zalloc-simple.cocci b/scripts/coccinelle/api/alloc/zalloc-simple.cocci
index 5cd1991c582e..26cda3f48f01 100644
--- a/scripts/coccinelle/api/alloc/zalloc-simple.cocci
+++ b/scripts/coccinelle/api/alloc/zalloc-simple.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// 2///
2/// Use zeroing allocator rather than allocator followed by memset with 0 3/// Use zeroing allocator rather than allocator followed by memset with 0
3/// 4///
@@ -6,9 +7,9 @@
6/// matched code has to be contiguous 7/// matched code has to be contiguous
7/// 8///
8// Confidence: High 9// Confidence: High
9// Copyright: (C) 2009-2010 Julia Lawall, Nicolas Palix, DIKU. GPLv2. 10// Copyright: (C) 2009-2010 Julia Lawall, Nicolas Palix, DIKU.
10// Copyright: (C) 2009-2010 Gilles Muller, INRIA/LiP6. GPLv2. 11// Copyright: (C) 2009-2010 Gilles Muller, INRIA/LiP6.
11// Copyright: (C) 2017 Himanshu Jha GPLv2. 12// Copyright: (C) 2017 Himanshu Jha
12// URL: http://coccinelle.lip6.fr/rules/kzalloc.html 13// URL: http://coccinelle.lip6.fr/rules/kzalloc.html
13// Options: --no-includes --include-headers 14// Options: --no-includes --include-headers
14// 15//
diff --git a/scripts/coccinelle/api/check_bq27xxx_data.cocci b/scripts/coccinelle/api/check_bq27xxx_data.cocci
index 9212b85169d2..fae539ef0ce5 100644
--- a/scripts/coccinelle/api/check_bq27xxx_data.cocci
+++ b/scripts/coccinelle/api/check_bq27xxx_data.cocci
@@ -1,10 +1,11 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Detect BQ27XXX_DATA structures with identical registers, dm registers or 2/// Detect BQ27XXX_DATA structures with identical registers, dm registers or
2/// properties. 3/// properties.
3//# Doesn't unfold macros used in register or property fields. 4//# Doesn't unfold macros used in register or property fields.
4//# Requires OCaml scripting 5//# Requires OCaml scripting
5/// 6///
6// Confidence: High 7// Confidence: High
7// Copyright: (C) 2017 Julia Lawall, Inria/LIP6, GPLv2. 8// Copyright: (C) 2017 Julia Lawall, Inria/LIP6,
8// URL: http://coccinelle.lip6.fr/ 9// URL: http://coccinelle.lip6.fr/
9// Requires: 1.0.7 10// Requires: 1.0.7
10// Keywords: BQ27XXX_DATA 11// Keywords: BQ27XXX_DATA
diff --git a/scripts/coccinelle/api/err_cast.cocci b/scripts/coccinelle/api/err_cast.cocci
index 2ce115000af6..0e661c8d8d6f 100644
--- a/scripts/coccinelle/api/err_cast.cocci
+++ b/scripts/coccinelle/api/err_cast.cocci
@@ -1,10 +1,11 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// 2///
2/// Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) 3/// Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
3/// 4///
4// Confidence: High 5// Confidence: High
5// Copyright: (C) 2009, 2010 Nicolas Palix, DIKU. GPLv2. 6// Copyright: (C) 2009, 2010 Nicolas Palix, DIKU.
6// Copyright: (C) 2009, 2010 Julia Lawall, DIKU. GPLv2. 7// Copyright: (C) 2009, 2010 Julia Lawall, DIKU.
7// Copyright: (C) 2009, 2010 Gilles Muller, INRIA/LiP6. GPLv2. 8// Copyright: (C) 2009, 2010 Gilles Muller, INRIA/LiP6.
8// URL: http://coccinelle.lip6.fr/ 9// URL: http://coccinelle.lip6.fr/
9// Options: 10// Options:
10// 11//
diff --git a/scripts/coccinelle/api/kstrdup.cocci b/scripts/coccinelle/api/kstrdup.cocci
index 09cba54ed0cf..888bf43df07e 100644
--- a/scripts/coccinelle/api/kstrdup.cocci
+++ b/scripts/coccinelle/api/kstrdup.cocci
@@ -1,9 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Use kstrdup rather than duplicating its implementation 2/// Use kstrdup rather than duplicating its implementation
2/// 3///
3// Confidence: High 4// Confidence: High
4// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 5// Copyright: (C) 2010-2012 Nicolas Palix.
5// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 6// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.
6// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 7// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.
7// URL: http://coccinelle.lip6.fr/ 8// URL: http://coccinelle.lip6.fr/
8// Comments: 9// Comments:
9// Options: --no-includes --include-headers 10// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/api/memdup.cocci b/scripts/coccinelle/api/memdup.cocci
index 8fd6437beda8..30b15df734e5 100644
--- a/scripts/coccinelle/api/memdup.cocci
+++ b/scripts/coccinelle/api/memdup.cocci
@@ -1,9 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Use kmemdup rather than duplicating its implementation 2/// Use kmemdup rather than duplicating its implementation
2/// 3///
3// Confidence: High 4// Confidence: High
4// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 5// Copyright: (C) 2010-2012 Nicolas Palix.
5// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 6// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.
6// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 7// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.
7// URL: http://coccinelle.lip6.fr/ 8// URL: http://coccinelle.lip6.fr/
8// Comments: 9// Comments:
9// Options: --no-includes --include-headers 10// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/api/memdup_user.cocci b/scripts/coccinelle/api/memdup_user.cocci
index 2a5aea8e8487..c809ab10bbce 100644
--- a/scripts/coccinelle/api/memdup_user.cocci
+++ b/scripts/coccinelle/api/memdup_user.cocci
@@ -1,10 +1,11 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Use memdup_user rather than duplicating its implementation 2/// Use memdup_user rather than duplicating its implementation
2/// This is a little bit restricted to reduce false positives 3/// This is a little bit restricted to reduce false positives
3/// 4///
4// Confidence: High 5// Confidence: High
5// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 6// Copyright: (C) 2010-2012 Nicolas Palix.
6// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 7// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.
7// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 8// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.
8// URL: http://coccinelle.lip6.fr/ 9// URL: http://coccinelle.lip6.fr/
9// Comments: 10// Comments:
10// Options: --no-includes --include-headers 11// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/api/platform_no_drv_owner.cocci b/scripts/coccinelle/api/platform_no_drv_owner.cocci
index c5e3f73f2054..8fa050eeb7e5 100644
--- a/scripts/coccinelle/api/platform_no_drv_owner.cocci
+++ b/scripts/coccinelle/api/platform_no_drv_owner.cocci
@@ -1,7 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Remove .owner field if calls are used which set it automatically 2/// Remove .owner field if calls are used which set it automatically
2/// 3///
3// Confidence: High 4// Confidence: High
4// Copyright: (C) 2014 Wolfram Sang. GPL v2. 5// Copyright: (C) 2014 Wolfram Sang.
5 6
6virtual patch 7virtual patch
7virtual context 8virtual context
diff --git a/scripts/coccinelle/api/pm_runtime.cocci b/scripts/coccinelle/api/pm_runtime.cocci
index d67ccf5f8227..1ccce3fd00b8 100644
--- a/scripts/coccinelle/api/pm_runtime.cocci
+++ b/scripts/coccinelle/api/pm_runtime.cocci
@@ -1,8 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Make sure pm_runtime_* calls does not use unnecessary IS_ERR_VALUE 2/// Make sure pm_runtime_* calls does not use unnecessary IS_ERR_VALUE
2/// 3///
3// Keywords: pm_runtime 4// Keywords: pm_runtime
4// Confidence: Medium 5// Confidence: Medium
5// Copyright (C) 2013 Texas Instruments Incorporated - GPLv2. 6// Copyright (C) 2013 Texas Instruments Incorporated -
6// URL: http://coccinelle.lip6.fr/ 7// URL: http://coccinelle.lip6.fr/
7// Options: --include-headers 8// Options: --include-headers
8 9
diff --git a/scripts/coccinelle/api/ptr_ret.cocci b/scripts/coccinelle/api/ptr_ret.cocci
index dd58dab5d411..e76cd5d90a8a 100644
--- a/scripts/coccinelle/api/ptr_ret.cocci
+++ b/scripts/coccinelle/api/ptr_ret.cocci
@@ -1,9 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// 2///
2/// Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR 3/// Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
3/// 4///
4// Confidence: High 5// Confidence: High
5// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 6// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
6// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 7// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
7// URL: http://coccinelle.lip6.fr/ 8// URL: http://coccinelle.lip6.fr/
8// Options: --no-includes --include-headers 9// Options: --no-includes --include-headers
9// 10//
diff --git a/scripts/coccinelle/api/resource_size.cocci b/scripts/coccinelle/api/resource_size.cocci
index 1935a58b39d9..a9a571ac04ce 100644
--- a/scripts/coccinelle/api/resource_size.cocci
+++ b/scripts/coccinelle/api/resource_size.cocci
@@ -1,11 +1,12 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// 2///
2/// Use resource_size function on resource object 3/// Use resource_size function on resource object
3/// instead of explicit computation. 4/// instead of explicit computation.
4/// 5///
5// Confidence: High 6// Confidence: High
6// Copyright: (C) 2009, 2010 Nicolas Palix, DIKU. GPLv2. 7// Copyright: (C) 2009, 2010 Nicolas Palix, DIKU.
7// Copyright: (C) 2009, 2010 Julia Lawall, DIKU. GPLv2. 8// Copyright: (C) 2009, 2010 Julia Lawall, DIKU.
8// Copyright: (C) 2009, 2010 Gilles Muller, INRIA/LiP6. GPLv2. 9// Copyright: (C) 2009, 2010 Gilles Muller, INRIA/LiP6.
9// URL: http://coccinelle.lip6.fr/ 10// URL: http://coccinelle.lip6.fr/
10// Options: 11// Options:
11// 12//
diff --git a/scripts/coccinelle/free/clk_put.cocci b/scripts/coccinelle/free/clk_put.cocci
index 46747adfd20a..7237b49496f6 100644
--- a/scripts/coccinelle/free/clk_put.cocci
+++ b/scripts/coccinelle/free/clk_put.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find missing clk_puts. 2/// Find missing clk_puts.
2/// 3///
3//# This only signals a missing clk_put when there is a clk_put later 4//# This only signals a missing clk_put when there is a clk_put later
@@ -5,8 +6,8 @@
5//# False positives can be due to loops. 6//# False positives can be due to loops.
6// 7//
7// Confidence: Moderate 8// Confidence: Moderate
8// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 9// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
9// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 10// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
10// URL: http://coccinelle.lip6.fr/ 11// URL: http://coccinelle.lip6.fr/
11// Comments: 12// Comments:
12// Options: 13// Options:
diff --git a/scripts/coccinelle/free/devm_free.cocci b/scripts/coccinelle/free/devm_free.cocci
index b2a2cf8bf81f..a5af9e335190 100644
--- a/scripts/coccinelle/free/devm_free.cocci
+++ b/scripts/coccinelle/free/devm_free.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find uses of standard freeing functons on values allocated using devm_ 2/// Find uses of standard freeing functons on values allocated using devm_
2/// functions. Values allocated using the devm_functions are freed when 3/// functions. Values allocated using the devm_functions are freed when
3/// the device is detached, and thus the use of the standard freeing 4/// the device is detached, and thus the use of the standard freeing
@@ -14,8 +15,8 @@
14/// less reliable in these cases. 15/// less reliable in these cases.
15/// 16///
16// Confidence: Moderate 17// Confidence: Moderate
17// Copyright: (C) 2011 Julia Lawall, INRIA/LIP6. GPLv2. 18// Copyright: (C) 2011 Julia Lawall, INRIA/LIP6.
18// Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2. 19// Copyright: (C) 2011 Gilles Muller, INRIA/LiP6.
19// URL: http://coccinelle.lip6.fr/ 20// URL: http://coccinelle.lip6.fr/
20// Comments: 21// Comments:
21// Options: --no-includes --include-headers 22// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/free/ifnullfree.cocci b/scripts/coccinelle/free/ifnullfree.cocci
index a70e123cb12b..b3290c4ee239 100644
--- a/scripts/coccinelle/free/ifnullfree.cocci
+++ b/scripts/coccinelle/free/ifnullfree.cocci
@@ -1,10 +1,11 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// NULL check before some freeing functions is not needed. 2/// NULL check before some freeing functions is not needed.
2/// 3///
3/// Based on checkpatch warning 4/// Based on checkpatch warning
4/// "kfree(NULL) is safe this check is probably not required" 5/// "kfree(NULL) is safe this check is probably not required"
5/// and kfreeaddr.cocci by Julia Lawall. 6/// and kfreeaddr.cocci by Julia Lawall.
6/// 7///
7// Copyright: (C) 2014 Fabian Frederick. GPLv2. 8// Copyright: (C) 2014 Fabian Frederick.
8// Comments: - 9// Comments: -
9// Options: --no-includes --include-headers 10// Options: --no-includes --include-headers
10 11
diff --git a/scripts/coccinelle/free/iounmap.cocci b/scripts/coccinelle/free/iounmap.cocci
index 5384f4ba1192..0e60e1113a1d 100644
--- a/scripts/coccinelle/free/iounmap.cocci
+++ b/scripts/coccinelle/free/iounmap.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find missing iounmaps. 2/// Find missing iounmaps.
2/// 3///
3//# This only signals a missing iounmap when there is an iounmap later 4//# This only signals a missing iounmap when there is an iounmap later
@@ -5,8 +6,8 @@
5//# False positives can be due to loops. 6//# False positives can be due to loops.
6// 7//
7// Confidence: Moderate 8// Confidence: Moderate
8// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 9// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
9// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 10// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
10// URL: http://coccinelle.lip6.fr/ 11// URL: http://coccinelle.lip6.fr/
11// Comments: 12// Comments:
12// Options: 13// Options:
diff --git a/scripts/coccinelle/free/kfree.cocci b/scripts/coccinelle/free/kfree.cocci
index ac438da4fd7b..e9d50e718e46 100644
--- a/scripts/coccinelle/free/kfree.cocci
+++ b/scripts/coccinelle/free/kfree.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find a use after free. 2/// Find a use after free.
2//# Values of variables may imply that some 3//# Values of variables may imply that some
3//# execution paths are not possible, resulting in false positives. 4//# execution paths are not possible, resulting in false positives.
@@ -5,9 +6,9 @@
5//# SCTP_DBG_OBJCNT_DEC that do not actually evaluate their argument 6//# SCTP_DBG_OBJCNT_DEC that do not actually evaluate their argument
6/// 7///
7// Confidence: Moderate 8// Confidence: Moderate
8// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 9// Copyright: (C) 2010-2012 Nicolas Palix.
9// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 10// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.
10// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 11// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.
11// URL: http://coccinelle.lip6.fr/ 12// URL: http://coccinelle.lip6.fr/
12// Comments: 13// Comments:
13// Options: --no-includes --include-headers 14// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/free/kfreeaddr.cocci b/scripts/coccinelle/free/kfreeaddr.cocci
index d46063b1db8b..cfaf308328d8 100644
--- a/scripts/coccinelle/free/kfreeaddr.cocci
+++ b/scripts/coccinelle/free/kfreeaddr.cocci
@@ -1,7 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Free of a structure field 2/// Free of a structure field
2/// 3///
3// Confidence: High 4// Confidence: High
4// Copyright: (C) 2013 Julia Lawall, INRIA/LIP6. GPLv2. 5// Copyright: (C) 2013 Julia Lawall, INRIA/LIP6.
5// URL: http://coccinelle.lip6.fr/ 6// URL: http://coccinelle.lip6.fr/
6// Comments: 7// Comments:
7// Options: --no-includes --include-headers 8// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/free/pci_free_consistent.cocci b/scripts/coccinelle/free/pci_free_consistent.cocci
index 43600ccb62a8..d51e92556b42 100644
--- a/scripts/coccinelle/free/pci_free_consistent.cocci
+++ b/scripts/coccinelle/free/pci_free_consistent.cocci
@@ -1,7 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find missing pci_free_consistent for every pci_alloc_consistent. 2/// Find missing pci_free_consistent for every pci_alloc_consistent.
2/// 3///
3// Confidence: Moderate 4// Confidence: Moderate
4// Copyright: (C) 2013 Petr Strnad. GPLv2. 5// Copyright: (C) 2013 Petr Strnad.
5// URL: http://coccinelle.lip6.fr/ 6// URL: http://coccinelle.lip6.fr/
6// Keywords: pci_free_consistent, pci_alloc_consistent 7// Keywords: pci_free_consistent, pci_alloc_consistent
7// Options: --no-includes --include-headers 8// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/iterators/device_node_continue.cocci b/scripts/coccinelle/iterators/device_node_continue.cocci
index a36c16db171b..f8cd14dfa604 100644
--- a/scripts/coccinelle/iterators/device_node_continue.cocci
+++ b/scripts/coccinelle/iterators/device_node_continue.cocci
@@ -1,8 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Device node iterators put the previous value of the index variable, so an 2/// Device node iterators put the previous value of the index variable, so an
2/// explicit put causes a double put. 3/// explicit put causes a double put.
3/// 4///
4// Confidence: High 5// Confidence: High
5// Copyright: (C) 2015 Julia Lawall, Inria. GPLv2. 6// Copyright: (C) 2015 Julia Lawall, Inria.
6// URL: http://coccinelle.lip6.fr/ 7// URL: http://coccinelle.lip6.fr/
7// Options: --no-includes --include-headers 8// Options: --no-includes --include-headers
8// Requires: 1.0.4 9// Requires: 1.0.4
diff --git a/scripts/coccinelle/iterators/fen.cocci b/scripts/coccinelle/iterators/fen.cocci
index 48c152f224e1..b69f9665f4fb 100644
--- a/scripts/coccinelle/iterators/fen.cocci
+++ b/scripts/coccinelle/iterators/fen.cocci
@@ -1,10 +1,11 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// These iterators only exit normally when the loop cursor is NULL, so there 2/// These iterators only exit normally when the loop cursor is NULL, so there
2/// is no point to call of_node_put on the final value. 3/// is no point to call of_node_put on the final value.
3/// 4///
4// Confidence: High 5// Confidence: High
5// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 6// Copyright: (C) 2010-2012 Nicolas Palix.
6// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 7// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.
7// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 8// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.
8// URL: http://coccinelle.lip6.fr/ 9// URL: http://coccinelle.lip6.fr/
9// Comments: 10// Comments:
10// Options: --no-includes --include-headers 11// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/iterators/itnull.cocci b/scripts/coccinelle/iterators/itnull.cocci
index f58732b56a40..9b362b98d7a1 100644
--- a/scripts/coccinelle/iterators/itnull.cocci
+++ b/scripts/coccinelle/iterators/itnull.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Many iterators have the property that the first argument is always bound 2/// Many iterators have the property that the first argument is always bound
2/// to a real list element, never NULL. 3/// to a real list element, never NULL.
3//# False positives arise for some iterators that do not have this property, 4//# False positives arise for some iterators that do not have this property,
@@ -6,9 +7,9 @@
6//# or return). 7//# or return).
7/// 8///
8// Confidence: Moderate 9// Confidence: Moderate
9// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 10// Copyright: (C) 2010-2012 Nicolas Palix.
10// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 11// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.
11// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 12// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.
12// URL: http://coccinelle.lip6.fr/ 13// URL: http://coccinelle.lip6.fr/
13// Comments: 14// Comments:
14// Options: --no-includes --include-headers 15// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/iterators/list_entry_update.cocci b/scripts/coccinelle/iterators/list_entry_update.cocci
index be6f9f1abb34..d62e8a16085f 100644
--- a/scripts/coccinelle/iterators/list_entry_update.cocci
+++ b/scripts/coccinelle/iterators/list_entry_update.cocci
@@ -1,12 +1,13 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// list_for_each_entry uses its first argument to get from one element of 2/// list_for_each_entry uses its first argument to get from one element of
2/// the list to the next, so it is usually not a good idea to reassign it. 3/// the list to the next, so it is usually not a good idea to reassign it.
3/// The first rule finds such a reassignment and the second rule checks 4/// The first rule finds such a reassignment and the second rule checks
4/// that there is a path from the reassignment back to the top of the loop. 5/// that there is a path from the reassignment back to the top of the loop.
5/// 6///
6// Confidence: High 7// Confidence: High
7// Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 8// Copyright: (C) 2010 Nicolas Palix, DIKU.
8// Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 9// Copyright: (C) 2010 Julia Lawall, DIKU.
9// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 10// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6.
10// URL: http://coccinelle.lip6.fr/ 11// URL: http://coccinelle.lip6.fr/
11// Comments: 12// Comments:
12// Options: --no-includes --include-headers 13// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/iterators/use_after_iter.cocci b/scripts/coccinelle/iterators/use_after_iter.cocci
index 66a1140474c8..9be48b520879 100644
--- a/scripts/coccinelle/iterators/use_after_iter.cocci
+++ b/scripts/coccinelle/iterators/use_after_iter.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// If list_for_each_entry, etc complete a traversal of the list, the iterator 2/// If list_for_each_entry, etc complete a traversal of the list, the iterator
2/// variable ends up pointing to an address at an offset from the list head, 3/// variable ends up pointing to an address at an offset from the list head,
3/// and not a meaningful structure. Thus this value should not be used after 4/// and not a meaningful structure. Thus this value should not be used after
@@ -7,8 +8,8 @@
7//#may also cause a report to be a false positive. 8//#may also cause a report to be a false positive.
8/// 9///
9// Confidence: Moderate 10// Confidence: Moderate
10// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 11// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
11// Copyright: (C) 2012 Gilles Muller, INRIA/LIP6. GPLv2. 12// Copyright: (C) 2012 Gilles Muller, INRIA/LIP6.
12// URL: http://coccinelle.lip6.fr/ 13// URL: http://coccinelle.lip6.fr/
13// Comments: 14// Comments:
14// Options: --no-includes --include-headers 15// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/locks/call_kern.cocci b/scripts/coccinelle/locks/call_kern.cocci
index 669b24436248..5ca0d81b0015 100644
--- a/scripts/coccinelle/locks/call_kern.cocci
+++ b/scripts/coccinelle/locks/call_kern.cocci
@@ -1,12 +1,13 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find functions that refer to GFP_KERNEL but are called with locks held. 2/// Find functions that refer to GFP_KERNEL but are called with locks held.
2//# The proposed change of converting the GFP_KERNEL is not necessarily the 3//# The proposed change of converting the GFP_KERNEL is not necessarily the
3//# correct one. It may be desired to unlock the lock, or to not call the 4//# correct one. It may be desired to unlock the lock, or to not call the
4//# function under the lock in the first place. 5//# function under the lock in the first place.
5/// 6///
6// Confidence: Moderate 7// Confidence: Moderate
7// Copyright: (C) 2012 Nicolas Palix. GPLv2. 8// Copyright: (C) 2012 Nicolas Palix.
8// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 9// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
9// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 10// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
10// URL: http://coccinelle.lip6.fr/ 11// URL: http://coccinelle.lip6.fr/
11// Comments: 12// Comments:
12// Options: --no-includes --include-headers 13// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/locks/double_lock.cocci b/scripts/coccinelle/locks/double_lock.cocci
index 002752f97dca..9e88a578957c 100644
--- a/scripts/coccinelle/locks/double_lock.cocci
+++ b/scripts/coccinelle/locks/double_lock.cocci
@@ -1,11 +1,12 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find double locks. False positives may occur when some paths cannot 2/// Find double locks. False positives may occur when some paths cannot
2/// occur at execution, due to the values of variables, and when there is 3/// occur at execution, due to the values of variables, and when there is
3/// an intervening function call that releases the lock. 4/// an intervening function call that releases the lock.
4/// 5///
5// Confidence: Moderate 6// Confidence: Moderate
6// Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 7// Copyright: (C) 2010 Nicolas Palix, DIKU.
7// Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 8// Copyright: (C) 2010 Julia Lawall, DIKU.
8// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 9// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6.
9// URL: http://coccinelle.lip6.fr/ 10// URL: http://coccinelle.lip6.fr/
10// Comments: 11// Comments:
11// Options: --no-includes --include-headers 12// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/locks/flags.cocci b/scripts/coccinelle/locks/flags.cocci
index debd70e46267..7f990cd55f5a 100644
--- a/scripts/coccinelle/locks/flags.cocci
+++ b/scripts/coccinelle/locks/flags.cocci
@@ -1,9 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find nested lock+irqsave functions that use the same flags variables 2/// Find nested lock+irqsave functions that use the same flags variables
2/// 3///
3// Confidence: High 4// Confidence: High
4// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 5// Copyright: (C) 2010-2012 Nicolas Palix.
5// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 6// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.
6// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 7// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.
7// URL: http://coccinelle.lip6.fr/ 8// URL: http://coccinelle.lip6.fr/
8// Comments: 9// Comments:
9// Options: --no-includes --include-headers 10// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/locks/mini_lock.cocci b/scripts/coccinelle/locks/mini_lock.cocci
index 19c6ee5b986b..c3ad098f4a5b 100644
--- a/scripts/coccinelle/locks/mini_lock.cocci
+++ b/scripts/coccinelle/locks/mini_lock.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find missing unlocks. This semantic match considers the specific case 2/// Find missing unlocks. This semantic match considers the specific case
2/// where the unlock is missing from an if branch, and there is a lock 3/// where the unlock is missing from an if branch, and there is a lock
3/// before the if and an unlock after the if. False positives are due to 4/// before the if and an unlock after the if. False positives are due to
@@ -6,9 +7,9 @@
6/// function call that releases the lock. 7/// function call that releases the lock.
7/// 8///
8// Confidence: Moderate 9// Confidence: Moderate
9// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 10// Copyright: (C) 2010-2012 Nicolas Palix.
10// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 11// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.
11// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 12// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.
12// URL: http://coccinelle.lip6.fr/ 13// URL: http://coccinelle.lip6.fr/
13// Comments: 14// Comments:
14// Options: --no-includes --include-headers 15// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/misc/array_size.cocci b/scripts/coccinelle/misc/array_size.cocci
index 09520f0941f0..4d2518749696 100644
--- a/scripts/coccinelle/misc/array_size.cocci
+++ b/scripts/coccinelle/misc/array_size.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element 2/// Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
2/// 3///
3//# This makes an effort to find cases where ARRAY_SIZE can be used such as 4//# This makes an effort to find cases where ARRAY_SIZE can be used such as
@@ -6,7 +7,7 @@
6//# division of the two sizeofs by ARRAY_SIZE. 7//# division of the two sizeofs by ARRAY_SIZE.
7// 8//
8// Confidence: High 9// Confidence: High
9// Copyright: (C) 2014 Himangi Saraogi. GPLv2. 10// Copyright: (C) 2014 Himangi Saraogi.
10// Comments: 11// Comments:
11// Options: --no-includes --include-headers 12// Options: --no-includes --include-headers
12 13
diff --git a/scripts/coccinelle/misc/badty.cocci b/scripts/coccinelle/misc/badty.cocci
index 08470362199c..ed3e0b8f3b1a 100644
--- a/scripts/coccinelle/misc/badty.cocci
+++ b/scripts/coccinelle/misc/badty.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Correct the size argument to alloc functions 2/// Correct the size argument to alloc functions
2/// 3///
3//# This makes an effort to find cases where the argument to sizeof is wrong 4//# This makes an effort to find cases where the argument to sizeof is wrong
@@ -8,7 +9,7 @@
8//# may need some reformatting. 9//# may need some reformatting.
9// 10//
10// Confidence: Moderate 11// Confidence: Moderate
11// Copyright: (C) 2014 Himangi Saraogi. GPLv2. 12// Copyright: (C) 2014 Himangi Saraogi.
12// Comments: 13// Comments:
13// Options: 14// Options:
14 15
diff --git a/scripts/coccinelle/misc/boolconv.cocci b/scripts/coccinelle/misc/boolconv.cocci
index 33c464d6bc71..392994e93a19 100644
--- a/scripts/coccinelle/misc/boolconv.cocci
+++ b/scripts/coccinelle/misc/boolconv.cocci
@@ -1,9 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Remove unneeded conversion to bool 2/// Remove unneeded conversion to bool
2/// 3///
3//# Relational and logical operators evaluate to bool, 4//# Relational and logical operators evaluate to bool,
4//# explicit conversion is overly verbose and unneeded. 5//# explicit conversion is overly verbose and unneeded.
5// 6//
6// Copyright: (C) 2016 Andrew F. Davis <afd@ti.com> GPLv2. 7// Copyright: (C) 2016 Andrew F. Davis <afd@ti.com>
7 8
8virtual patch 9virtual patch
9virtual context 10virtual context
diff --git a/scripts/coccinelle/misc/boolinit.cocci b/scripts/coccinelle/misc/boolinit.cocci
index aabb581fab5c..fed6126e2b9d 100644
--- a/scripts/coccinelle/misc/boolinit.cocci
+++ b/scripts/coccinelle/misc/boolinit.cocci
@@ -1,10 +1,11 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Bool initializations should use true and false. Bool tests don't need 2/// Bool initializations should use true and false. Bool tests don't need
2/// comparisons. Based on contributions from Joe Perches, Rusty Russell 3/// comparisons. Based on contributions from Joe Perches, Rusty Russell
3/// and Bruce W Allan. 4/// and Bruce W Allan.
4/// 5///
5// Confidence: High 6// Confidence: High
6// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 7// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
7// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 8// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
8// URL: http://coccinelle.lip6.fr/ 9// URL: http://coccinelle.lip6.fr/
9// Options: --include-headers 10// Options: --include-headers
10 11
diff --git a/scripts/coccinelle/misc/bugon.cocci b/scripts/coccinelle/misc/bugon.cocci
index 741586094abe..8d595c358408 100644
--- a/scripts/coccinelle/misc/bugon.cocci
+++ b/scripts/coccinelle/misc/bugon.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Use BUG_ON instead of a if condition followed by BUG. 2/// Use BUG_ON instead of a if condition followed by BUG.
2/// 3///
3//# This makes an effort to find cases where BUG() follows an if 4//# This makes an effort to find cases where BUG() follows an if
@@ -6,7 +7,7 @@
6//# as argument. 7//# as argument.
7// 8//
8// Confidence: High 9// Confidence: High
9// Copyright: (C) 2014 Himangi Saraogi. GPLv2. 10// Copyright: (C) 2014 Himangi Saraogi.
10// Comments: 11// Comments:
11// Options: --no-includes --include-headers 12// Options: --no-includes --include-headers
12 13
diff --git a/scripts/coccinelle/misc/cond_no_effect.cocci b/scripts/coccinelle/misc/cond_no_effect.cocci
index 8467dbd1c465..91d16a81d1da 100644
--- a/scripts/coccinelle/misc/cond_no_effect.cocci
+++ b/scripts/coccinelle/misc/cond_no_effect.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1///Find conditions where if and else branch are functionally 2///Find conditions where if and else branch are functionally
2// identical. 3// identical.
3// 4//
@@ -37,7 +38,7 @@
37// All other cases look like bugs or at least lack of documentation 38// All other cases look like bugs or at least lack of documentation
38// 39//
39// Confidence: Moderate 40// Confidence: Moderate
40// Copyright: (C) 2016 Nicholas Mc Guire, OSADL. GPLv2. 41// Copyright: (C) 2016 Nicholas Mc Guire, OSADL.
41// Comments: 42// Comments:
42// Options: --no-includes --include-headers 43// Options: --no-includes --include-headers
43 44
diff --git a/scripts/coccinelle/misc/cstptr.cocci b/scripts/coccinelle/misc/cstptr.cocci
index f0368b3d4563..c52e3c8ca9b3 100644
--- a/scripts/coccinelle/misc/cstptr.cocci
+++ b/scripts/coccinelle/misc/cstptr.cocci
@@ -1,9 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// PTR_ERR should be applied before its argument is reassigned, typically 2/// PTR_ERR should be applied before its argument is reassigned, typically
2/// to NULL 3/// to NULL
3/// 4///
4// Confidence: High 5// Confidence: High
5// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 6// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
6// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 7// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
7// URL: http://coccinelle.lip6.fr/ 8// URL: http://coccinelle.lip6.fr/
8// Comments: 9// Comments:
9// Options: --no-includes --include-headers 10// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/misc/doubleinit.cocci b/scripts/coccinelle/misc/doubleinit.cocci
index c0c3371d25e0..2f80d3ab38dd 100644
--- a/scripts/coccinelle/misc/doubleinit.cocci
+++ b/scripts/coccinelle/misc/doubleinit.cocci
@@ -1,11 +1,12 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find duplicate field initializations. This has a high rate of false 2/// Find duplicate field initializations. This has a high rate of false
2/// positives due to #ifdefs, which Coccinelle is not aware of in a structure 3/// positives due to #ifdefs, which Coccinelle is not aware of in a structure
3/// initialization. 4/// initialization.
4/// 5///
5// Confidence: Low 6// Confidence: Low
6// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 7// Copyright: (C) 2010-2012 Nicolas Palix.
7// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 8// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.
8// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 9// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.
9// URL: http://coccinelle.lip6.fr/ 10// URL: http://coccinelle.lip6.fr/
10// Comments: requires at least Coccinelle 0.2.4, lex or parse error otherwise 11// Comments: requires at least Coccinelle 0.2.4, lex or parse error otherwise
11// Options: --no-includes --include-headers 12// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/misc/ifaddr.cocci b/scripts/coccinelle/misc/ifaddr.cocci
index c2663c677ac1..fc92e8fcbfcb 100644
--- a/scripts/coccinelle/misc/ifaddr.cocci
+++ b/scripts/coccinelle/misc/ifaddr.cocci
@@ -1,8 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// The address of a variable or field is likely always to be non-zero. 2/// The address of a variable or field is likely always to be non-zero.
2/// 3///
3// Confidence: High 4// Confidence: High
4// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 5// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
5// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 6// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
6// URL: http://coccinelle.lip6.fr/ 7// URL: http://coccinelle.lip6.fr/
7// Comments: 8// Comments:
8// Options: --no-includes --include-headers 9// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/misc/ifcol.cocci b/scripts/coccinelle/misc/ifcol.cocci
index ffe75407c5d2..da0351ed5740 100644
--- a/scripts/coccinelle/misc/ifcol.cocci
+++ b/scripts/coccinelle/misc/ifcol.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find confusingly indented code in or after an if. An if branch should 2/// Find confusingly indented code in or after an if. An if branch should
2/// be indented. The code following an if should not be indented. 3/// be indented. The code following an if should not be indented.
3/// Sometimes, code after an if that is indented is actually intended to be 4/// Sometimes, code after an if that is indented is actually intended to be
@@ -8,9 +9,9 @@
8//# is not visually aligned may be considered to be in the same column. 9//# is not visually aligned may be considered to be in the same column.
9// 10//
10// Confidence: Low 11// Confidence: Low
11// Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 12// Copyright: (C) 2010 Nicolas Palix, DIKU.
12// Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 13// Copyright: (C) 2010 Julia Lawall, DIKU.
13// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 14// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6.
14// URL: http://coccinelle.lip6.fr/ 15// URL: http://coccinelle.lip6.fr/
15// Comments: 16// Comments:
16// Options: --no-includes --include-headers 17// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/misc/noderef.cocci b/scripts/coccinelle/misc/noderef.cocci
index 007f0de0c715..72de62a77a44 100644
--- a/scripts/coccinelle/misc/noderef.cocci
+++ b/scripts/coccinelle/misc/noderef.cocci
@@ -1,9 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// sizeof when applied to a pointer typed expression gives the size of 2/// sizeof when applied to a pointer typed expression gives the size of
2/// the pointer 3/// the pointer
3/// 4///
4// Confidence: High 5// Confidence: High
5// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 6// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
6// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 7// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
7// URL: http://coccinelle.lip6.fr/ 8// URL: http://coccinelle.lip6.fr/
8// Comments: 9// Comments:
9// Options: --no-includes --include-headers 10// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/misc/orplus.cocci b/scripts/coccinelle/misc/orplus.cocci
index 08de5be73693..52203dc2ca4b 100644
--- a/scripts/coccinelle/misc/orplus.cocci
+++ b/scripts/coccinelle/misc/orplus.cocci
@@ -1,10 +1,11 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Check for constants that are added but are used elsewhere as bitmasks 2/// Check for constants that are added but are used elsewhere as bitmasks
2/// The results should be checked manually to ensure that the nonzero 3/// The results should be checked manually to ensure that the nonzero
3/// bits in the two constants are actually disjoint. 4/// bits in the two constants are actually disjoint.
4/// 5///
5// Confidence: Moderate 6// Confidence: Moderate
6// Copyright: (C) 2013 Julia Lawall, INRIA/LIP6. GPLv2. 7// Copyright: (C) 2013 Julia Lawall, INRIA/LIP6.
7// Copyright: (C) 2013 Gilles Muller, INRIA/LIP6. GPLv2. 8// Copyright: (C) 2013 Gilles Muller, INRIA/LIP6.
8// URL: http://coccinelle.lip6.fr/ 9// URL: http://coccinelle.lip6.fr/
9// Comments: 10// Comments:
10// Options: --no-includes --include-headers 11// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/misc/returnvar.cocci b/scripts/coccinelle/misc/returnvar.cocci
index d8286ef5307f..ce0d9eebc7e1 100644
--- a/scripts/coccinelle/misc/returnvar.cocci
+++ b/scripts/coccinelle/misc/returnvar.cocci
@@ -1,8 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// 2///
2/// Remove unneeded variable used to store return value. 3/// Remove unneeded variable used to store return value.
3/// 4///
4// Confidence: Moderate 5// Confidence: Moderate
5// Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6. GPLv2. 6// Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6.
6// URL: http://coccinelle.lip6.fr/ 7// URL: http://coccinelle.lip6.fr/
7// Comments: Comments on code can be deleted if near code that is removed. 8// Comments: Comments on code can be deleted if near code that is removed.
8// "when strict" can be removed to get more hits, but adds false 9// "when strict" can be removed to get more hits, but adds false
diff --git a/scripts/coccinelle/misc/semicolon.cocci b/scripts/coccinelle/misc/semicolon.cocci
index 6740c659a2b3..a53edb026dad 100644
--- a/scripts/coccinelle/misc/semicolon.cocci
+++ b/scripts/coccinelle/misc/semicolon.cocci
@@ -1,8 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// 2///
2/// Remove unneeded semicolon. 3/// Remove unneeded semicolon.
3/// 4///
4// Confidence: Moderate 5// Confidence: Moderate
5// Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6. GPLv2. 6// Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6.
6// URL: http://coccinelle.lip6.fr/ 7// URL: http://coccinelle.lip6.fr/
7// Comments: Some false positives on empty default cases in switch statements. 8// Comments: Some false positives on empty default cases in switch statements.
8// Options: --no-includes --include-headers 9// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/misc/warn.cocci b/scripts/coccinelle/misc/warn.cocci
index d2e5b6cedb84..e379661e240d 100644
--- a/scripts/coccinelle/misc/warn.cocci
+++ b/scripts/coccinelle/misc/warn.cocci
@@ -1,8 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Use WARN(1,...) rather than printk followed by WARN_ON(1) 2/// Use WARN(1,...) rather than printk followed by WARN_ON(1)
2/// 3///
3// Confidence: High 4// Confidence: High
4// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 5// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
5// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 6// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
6// URL: http://coccinelle.lip6.fr/ 7// URL: http://coccinelle.lip6.fr/
7// Comments: 8// Comments:
8// Options: --no-includes --include-headers 9// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/null/badzero.cocci b/scripts/coccinelle/null/badzero.cocci
index f597c8007b76..882dd65313ab 100644
--- a/scripts/coccinelle/null/badzero.cocci
+++ b/scripts/coccinelle/null/badzero.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Compare pointer-typed values to NULL rather than 0 2/// Compare pointer-typed values to NULL rather than 0
2/// 3///
3//# This makes an effort to choose between !x and x == NULL. !x is used 4//# This makes an effort to choose between !x and x == NULL. !x is used
@@ -7,8 +8,8 @@
7//# include path. 8//# include path.
8// 9//
9// Confidence: High 10// Confidence: High
10// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 11// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
11// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 12// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
12// URL: http://coccinelle.lip6.fr/ 13// URL: http://coccinelle.lip6.fr/
13// Requires: 1.0.0 14// Requires: 1.0.0
14// Options: 15// Options:
diff --git a/scripts/coccinelle/null/deref_null.cocci b/scripts/coccinelle/null/deref_null.cocci
index cbc6184e69ef..98f1e7faf503 100644
--- a/scripts/coccinelle/null/deref_null.cocci
+++ b/scripts/coccinelle/null/deref_null.cocci
@@ -1,11 +1,12 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// 2///
2/// A variable is dereferenced under a NULL test. 3/// A variable is dereferenced under a NULL test.
3/// Even though it is known to be NULL. 4/// Even though it is known to be NULL.
4/// 5///
5// Confidence: Moderate 6// Confidence: Moderate
6// Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 7// Copyright: (C) 2010 Nicolas Palix, DIKU.
7// Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 8// Copyright: (C) 2010 Julia Lawall, DIKU.
8// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 9// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6.
9// URL: http://coccinelle.lip6.fr/ 10// URL: http://coccinelle.lip6.fr/
10// Comments: -I ... -all_includes can give more complete results 11// Comments: -I ... -all_includes can give more complete results
11// Options: 12// Options:
diff --git a/scripts/coccinelle/null/eno.cocci b/scripts/coccinelle/null/eno.cocci
index 9bd29aa83399..81584ff87956 100644
--- a/scripts/coccinelle/null/eno.cocci
+++ b/scripts/coccinelle/null/eno.cocci
@@ -1,9 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// The various basic memory allocation functions don't return ERR_PTR 2/// The various basic memory allocation functions don't return ERR_PTR
2/// 3///
3// Confidence: High 4// Confidence: High
4// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 5// Copyright: (C) 2010-2012 Nicolas Palix.
5// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 6// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6.
6// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 7// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6.
7// URL: http://coccinelle.lip6.fr/ 8// URL: http://coccinelle.lip6.fr/
8// Comments: 9// Comments:
9// Options: --no-includes --include-headers 10// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/null/kmerr.cocci b/scripts/coccinelle/null/kmerr.cocci
index 5354a7903ccb..d0e004d4e130 100644
--- a/scripts/coccinelle/null/kmerr.cocci
+++ b/scripts/coccinelle/null/kmerr.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// This semantic patch looks for kmalloc etc that are not followed by a 2/// This semantic patch looks for kmalloc etc that are not followed by a
2/// NULL check. It only gives a report in the case where there is some 3/// NULL check. It only gives a report in the case where there is some
3/// error handling code later in the function, which may be helpful 4/// error handling code later in the function, which may be helpful
@@ -5,9 +6,9 @@
5/// should be. 6/// should be.
6/// 7///
7// Confidence: High 8// Confidence: High
8// Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 9// Copyright: (C) 2010 Nicolas Palix, DIKU.
9// Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 10// Copyright: (C) 2010 Julia Lawall, DIKU.
10// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 11// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6.
11// URL: http://coccinelle.lip6.fr/ 12// URL: http://coccinelle.lip6.fr/
12// Comments: 13// Comments:
13// Options: --no-includes --include-headers 14// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/tests/doublebitand.cocci b/scripts/coccinelle/tests/doublebitand.cocci
index 72f1572aaec3..0f0b94e7debd 100644
--- a/scripts/coccinelle/tests/doublebitand.cocci
+++ b/scripts/coccinelle/tests/doublebitand.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find bit operations that include the same argument more than once 2/// Find bit operations that include the same argument more than once
2//# One source of false positives is when the argument performs a side 3//# One source of false positives is when the argument performs a side
3//# effect. Another source of false positives is when a neutral value 4//# effect. Another source of false positives is when a neutral value
@@ -5,9 +6,9 @@
5//# same structure as other similar expressions 6//# same structure as other similar expressions
6/// 7///
7// Confidence: Moderate 8// Confidence: Moderate
8// Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 9// Copyright: (C) 2010 Nicolas Palix, DIKU.
9// Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 10// Copyright: (C) 2010 Julia Lawall, DIKU.
10// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 11// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6.
11// URL: http://coccinelle.lip6.fr/ 12// URL: http://coccinelle.lip6.fr/
12// Comments: 13// Comments:
13// Options: --no-includes --include-headers 14// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/tests/doubletest.cocci b/scripts/coccinelle/tests/doubletest.cocci
index 7af2ce7eb9bf..b35519cddb13 100644
--- a/scripts/coccinelle/tests/doubletest.cocci
+++ b/scripts/coccinelle/tests/doubletest.cocci
@@ -1,12 +1,13 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Find &&/|| operations that include the same argument more than once 2/// Find &&/|| operations that include the same argument more than once
2//# A common source of false positives is when the expression, or 3//# A common source of false positives is when the expression, or
3//# another expresssion in the same && or || operation, performs a 4//# another expresssion in the same && or || operation, performs a
4//# side effect. 5//# side effect.
5/// 6///
6// Confidence: Moderate 7// Confidence: Moderate
7// Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 8// Copyright: (C) 2010 Nicolas Palix, DIKU.
8// Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 9// Copyright: (C) 2010 Julia Lawall, DIKU.
9// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 10// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6.
10// URL: http://coccinelle.lip6.fr/ 11// URL: http://coccinelle.lip6.fr/
11// Comments: 12// Comments:
12// Options: --no-includes --include-headers 13// Options: --no-includes --include-headers
diff --git a/scripts/coccinelle/tests/odd_ptr_err.cocci b/scripts/coccinelle/tests/odd_ptr_err.cocci
index dfc6b40c2969..11d4e2b6deb8 100644
--- a/scripts/coccinelle/tests/odd_ptr_err.cocci
+++ b/scripts/coccinelle/tests/odd_ptr_err.cocci
@@ -1,10 +1,11 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// PTR_ERR should access the value just tested by IS_ERR 2/// PTR_ERR should access the value just tested by IS_ERR
2//# There can be false positives in the patch case, where it is the call to 3//# There can be false positives in the patch case, where it is the call to
3//# IS_ERR that is wrong. 4//# IS_ERR that is wrong.
4/// 5///
5// Confidence: High 6// Confidence: High
6// Copyright: (C) 2012, 2015 Julia Lawall, INRIA. GPLv2. 7// Copyright: (C) 2012, 2015 Julia Lawall, INRIA.
7// Copyright: (C) 2012, 2015 Gilles Muller, INRIA. GPLv2. 8// Copyright: (C) 2012, 2015 Gilles Muller, INRIA.
8// URL: http://coccinelle.lip6.fr/ 9// URL: http://coccinelle.lip6.fr/
9// Options: --no-includes --include-headers 10// Options: --no-includes --include-headers
10 11
diff --git a/scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci b/scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci
index 8fa5a3c7b784..91e286ace54c 100644
--- a/scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci
+++ b/scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/// Unsigned expressions cannot be lesser than zero. Presence of 2/// Unsigned expressions cannot be lesser than zero. Presence of
2/// comparisons 'unsigned (<|<=|>|>=) 0' often indicates a bug, 3/// comparisons 'unsigned (<|<=|>|>=) 0' often indicates a bug,
3/// usually wrong type of variable. 4/// usually wrong type of variable.
@@ -11,7 +12,7 @@
11/// result is used to avoid false positives difficult to detect by other ways 12/// result is used to avoid false positives difficult to detect by other ways
12/// 13///
13// Confidence: Average 14// Confidence: Average
14// Copyright: (C) 2015 Andrzej Hajda, Samsung Electronics Co., Ltd. GPLv2. 15// Copyright: (C) 2015 Andrzej Hajda, Samsung Electronics Co., Ltd.
15// URL: http://coccinelle.lip6.fr/ 16// URL: http://coccinelle.lip6.fr/
16// Options: --all-includes 17// Options: --all-includes
17 18
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index bcdd45df3f51..a7a36209a193 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -73,7 +73,7 @@ parse_symbol() {
73 if [[ "${cache[$module,$address]+isset}" == "isset" ]]; then 73 if [[ "${cache[$module,$address]+isset}" == "isset" ]]; then
74 local code=${cache[$module,$address]} 74 local code=${cache[$module,$address]}
75 else 75 else
76 local code=$(addr2line -i -e "$objfile" "$address") 76 local code=$(${CROSS_COMPILE}addr2line -i -e "$objfile" "$address")
77 cache[$module,$address]=$code 77 cache[$module,$address]=$code
78 fi 78 fi
79 79
diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c
index 4834e44b37b2..1ae7a54d4f12 100644
--- a/scripts/dtc/checks.c
+++ b/scripts/dtc/checks.c
@@ -1,21 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2007. 3 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2007.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 * USA
19 */ 4 */
20 5
21#include "dtc.h" 6#include "dtc.h"
diff --git a/scripts/dtc/data.c b/scripts/dtc/data.c
index 4a204145cc7b..0a43b6de3264 100644
--- a/scripts/dtc/data.c
+++ b/scripts/dtc/data.c
@@ -1,21 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. 3 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 * USA
19 */ 4 */
20 5
21#include "dtc.h" 6#include "dtc.h"
diff --git a/scripts/dtc/dt_to_config b/scripts/dtc/dt_to_config
index 5dfd1bff351f..299d1c2b20d7 100755
--- a/scripts/dtc/dt_to_config
+++ b/scripts/dtc/dt_to_config
@@ -1,10 +1,9 @@
1#!/usr/bin/env perl 1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0-only
2 3
3# Copyright 2016 by Frank Rowand 4# Copyright 2016 by Frank Rowand
4# Copyright 2016 by Gaurav Minocha 5# Copyright 2016 by Gaurav Minocha
5# 6#
6# This file is subject to the terms and conditions of the GNU General Public
7# License v2.
8 7
9use strict 'refs'; 8use strict 'refs';
10use strict subs; 9use strict subs;
diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c
index 695e1f789fc7..bdb3f5945699 100644
--- a/scripts/dtc/dtc.c
+++ b/scripts/dtc/dtc.c
@@ -1,21 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. 3 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 * USA
19 */ 4 */
20 5
21#include <sys/stat.h> 6#include <sys/stat.h>
diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h
index 789e0b1bc057..357b878607ca 100644
--- a/scripts/dtc/dtc.h
+++ b/scripts/dtc/dtc.h
@@ -1,24 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1#ifndef DTC_H 2#ifndef DTC_H
2#define DTC_H 3#define DTC_H
3 4
4/* 5/*
5 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. 6 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
6 *
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA
22 */ 7 */
23 8
24#include <stdio.h> 9#include <stdio.h>
diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
index 0d8572008729..00fd4738a587 100755
--- a/scripts/dtc/dtx_diff
+++ b/scripts/dtc/dtx_diff
@@ -1,10 +1,8 @@
1#! /bin/bash 1#! /bin/bash
2# SPDX-License-Identifier: GPL-2.0-only
2 3
3# Copyright (C) 2015 Frank Rowand 4# Copyright (C) 2015 Frank Rowand
4# 5#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; version 2 of the License.
8 6
9 7
10usage() { 8usage() {
diff --git a/scripts/dtc/fdtget.c b/scripts/dtc/fdtget.c
index c2fbab2a5476..c922f82246c6 100644
--- a/scripts/dtc/fdtget.c
+++ b/scripts/dtc/fdtget.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 3 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
3 * 4 *
@@ -6,21 +7,6 @@
6 * Based on code written by: 7 * Based on code written by:
7 * Pantelis Antoniou <pantelis.antoniou@gmail.com> and 8 * Pantelis Antoniou <pantelis.antoniou@gmail.com> and
8 * Matthew McClintock <msm@freescale.com> 9 * Matthew McClintock <msm@freescale.com>
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 * MA 02111-1307 USA
24 */ 10 */
25 11
26#include <assert.h> 12#include <assert.h>
diff --git a/scripts/dtc/fdtput.c b/scripts/dtc/fdtput.c
index f2197f51930b..a363c3cabc59 100644
--- a/scripts/dtc/fdtput.c
+++ b/scripts/dtc/fdtput.c
@@ -1,20 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 3 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
17 * MA 02111-1307 USA
18 */ 4 */
19 5
20#include <assert.h> 6#include <assert.h>
diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c
index acf04c30669f..65705a3c7ce1 100644
--- a/scripts/dtc/flattree.c
+++ b/scripts/dtc/flattree.c
@@ -1,21 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. 3 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 * USA
19 */ 4 */
20 5
21#include "dtc.h" 6#include "dtc.h"
diff --git a/scripts/dtc/fstree.c b/scripts/dtc/fstree.c
index 1e7eeba47ff6..9871689b4afb 100644
--- a/scripts/dtc/fstree.c
+++ b/scripts/dtc/fstree.c
@@ -1,21 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. 3 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 * USA
19 */ 4 */
20 5
21#include "dtc.h" 6#include "dtc.h"
diff --git a/scripts/dtc/livetree.c b/scripts/dtc/livetree.c
index 7a2e6446a17b..3275231d396b 100644
--- a/scripts/dtc/livetree.c
+++ b/scripts/dtc/livetree.c
@@ -1,21 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. 3 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 * USA
19 */ 4 */
20 5
21#include "dtc.h" 6#include "dtc.h"
diff --git a/scripts/dtc/srcpos.c b/scripts/dtc/srcpos.c
index 41f83700ee91..f5205fb9c1ff 100644
--- a/scripts/dtc/srcpos.c
+++ b/scripts/dtc/srcpos.c
@@ -1,20 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc. 3 * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17 * USA
18 */ 4 */
19 5
20#define _GNU_SOURCE 6#define _GNU_SOURCE
diff --git a/scripts/dtc/srcpos.h b/scripts/dtc/srcpos.h
index 6326a952c40e..4318d7ad34d9 100644
--- a/scripts/dtc/srcpos.h
+++ b/scripts/dtc/srcpos.h
@@ -1,20 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/* 2/*
2 * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc. 3 * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17 * USA
18 */ 4 */
19 5
20#ifndef SRCPOS_H 6#ifndef SRCPOS_H
diff --git a/scripts/dtc/treesource.c b/scripts/dtc/treesource.c
index 1af36628b75f..c9d980c8abfc 100644
--- a/scripts/dtc/treesource.c
+++ b/scripts/dtc/treesource.c
@@ -1,21 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. 3 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 * USA
19 */ 4 */
20 5
21#include "dtc.h" 6#include "dtc.h"
diff --git a/scripts/dtc/util.c b/scripts/dtc/util.c
index 9c6fb5f286ae..48af961dcc8c 100644
--- a/scripts/dtc/util.c
+++ b/scripts/dtc/util.c
@@ -1,24 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Copyright 2011 The Chromium Authors, All Rights Reserved. 3 * Copyright 2011 The Chromium Authors, All Rights Reserved.
3 * Copyright 2008 Jon Loeliger, Freescale Semiconductor, Inc. 4 * Copyright 2008 Jon Loeliger, Freescale Semiconductor, Inc.
4 * 5 *
5 * util_is_printable_string contributed by 6 * util_is_printable_string contributed by
6 * Pantelis Antoniou <pantelis.antoniou AT gmail.com> 7 * Pantelis Antoniou <pantelis.antoniou AT gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA
22 */ 8 */
23 9
24#include <ctype.h> 10#include <ctype.h>
diff --git a/scripts/dtc/util.h b/scripts/dtc/util.h
index 7658781a6200..11a5614591b1 100644
--- a/scripts/dtc/util.h
+++ b/scripts/dtc/util.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1#ifndef UTIL_H 2#ifndef UTIL_H
2#define UTIL_H 3#define UTIL_H
3 4
@@ -8,21 +9,6 @@
8/* 9/*
9 * Copyright 2011 The Chromium Authors, All Rights Reserved. 10 * Copyright 2011 The Chromium Authors, All Rights Reserved.
10 * Copyright 2008 Jon Loeliger, Freescale Semiconductor, Inc. 11 * Copyright 2008 Jon Loeliger, Freescale Semiconductor, Inc.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25 * USA
26 */ 12 */
27 13
28#ifdef __GNUC__ 14#ifdef __GNUC__
diff --git a/scripts/dtc/yamltree.c b/scripts/dtc/yamltree.c
index a00285a5a9ec..5b6ea8ea862f 100644
--- a/scripts/dtc/yamltree.c
+++ b/scripts/dtc/yamltree.c
@@ -1,22 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * (C) Copyright Linaro, Ltd. 2018 3 * (C) Copyright Linaro, Ltd. 2018
3 * (C) Copyright Arm Holdings. 2017 4 * (C) Copyright Arm Holdings. 2017
4 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. 5 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 * USA
20 */ 6 */
21 7
22#include <stdlib.h> 8#include <stdlib.h>
diff --git a/scripts/export_report.pl b/scripts/export_report.pl
index 68ff426b347c..0f604f62f067 100755
--- a/scripts/export_report.pl
+++ b/scripts/export_report.pl
@@ -1,7 +1,7 @@
1#!/usr/bin/env perl 1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0-only
2# 3#
3# (C) Copyright IBM Corporation 2006. 4# (C) Copyright IBM Corporation 2006.
4# Released under GPL v2.
5# Author : Ram Pai (linuxram@us.ibm.com) 5# Author : Ram Pai (linuxram@us.ibm.com)
6# 6#
7# Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c 7# Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c
diff --git a/scripts/extract-vmlinux b/scripts/extract-vmlinux
index 85e1f32fb4a0..8995cd304e6e 100755
--- a/scripts/extract-vmlinux
+++ b/scripts/extract-vmlinux
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-only
2# ---------------------------------------------------------------------- 3# ----------------------------------------------------------------------
3# extract-vmlinux - Extract uncompressed vmlinux from a kernel image 4# extract-vmlinux - Extract uncompressed vmlinux from a kernel image
4# 5#
@@ -7,7 +8,6 @@
7# 8#
8# (c) 2011 Corentin Chary <corentin.chary@gmail.com> 9# (c) 2011 Corentin Chary <corentin.chary@gmail.com>
9# 10#
10# Licensed under the GNU General Public License, version 2 (GPLv2).
11# ---------------------------------------------------------------------- 11# ----------------------------------------------------------------------
12 12
13check_vmlinux() 13check_vmlinux()
diff --git a/scripts/extract_xc3028.pl b/scripts/extract_xc3028.pl
index a1c51b7e4baf..e1c9af25a595 100755
--- a/scripts/extract_xc3028.pl
+++ b/scripts/extract_xc3028.pl
@@ -1,7 +1,7 @@
1#!/usr/bin/env perl 1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0-only
2 3
3# Copyright (c) Mauro Carvalho Chehab <mchehab@kernel.org> 4# Copyright (c) Mauro Carvalho Chehab <mchehab@kernel.org>
4# Released under GPLv2
5# 5#
6# In order to use, you need to: 6# In order to use, you need to:
7# 1) Download the windows driver with something like: 7# 1) Download the windows driver with something like:
diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
index 552d5efd7cb7..17f06079a712 100644
--- a/scripts/gcc-plugins/gcc-common.h
+++ b/scripts/gcc-plugins/gcc-common.h
@@ -150,8 +150,12 @@ void print_gimple_expr(FILE *, gimple, int, int);
150void dump_gimple_stmt(pretty_printer *, gimple, int, int); 150void dump_gimple_stmt(pretty_printer *, gimple, int, int);
151#endif 151#endif
152 152
153#ifndef __unused
153#define __unused __attribute__((__unused__)) 154#define __unused __attribute__((__unused__))
155#endif
156#ifndef __visible
154#define __visible __attribute__((visibility("default"))) 157#define __visible __attribute__((visibility("default")))
158#endif
155 159
156#define DECL_NAME_POINTER(node) IDENTIFIER_POINTER(DECL_NAME(node)) 160#define DECL_NAME_POINTER(node) IDENTIFIER_POINTER(DECL_NAME(node))
157#define DECL_NAME_LENGTH(node) IDENTIFIER_LENGTH(DECL_NAME(node)) 161#define DECL_NAME_LENGTH(node) IDENTIFIER_LENGTH(DECL_NAME(node))
diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in
index 1d73083da6cb..2efbec6b6b8d 100644
--- a/scripts/gdb/linux/constants.py.in
+++ b/scripts/gdb/linux/constants.py.in
@@ -40,7 +40,8 @@
40import gdb 40import gdb
41 41
42/* linux/clk-provider.h */ 42/* linux/clk-provider.h */
43LX_GDBPARSED(CLK_GET_RATE_NOCACHE) 43if IS_BUILTIN(CONFIG_COMMON_CLK):
44 LX_GDBPARSED(CLK_GET_RATE_NOCACHE)
44 45
45/* linux/fs.h */ 46/* linux/fs.h */
46LX_VALUE(SB_RDONLY) 47LX_VALUE(SB_RDONLY)
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index e007840f45b9..23eff234184f 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* Generate kernel symbol version hashes. 2/* Generate kernel symbol version hashes.
2 Copyright 1996, 1997 Linux International. 3 Copyright 1996, 1997 Linux International.
3 4
@@ -7,19 +8,7 @@
7 This file was part of the Linux modutils 2.4.22: moved back into the 8 This file was part of the Linux modutils 2.4.22: moved back into the
8 kernel sources by Rusty Russell/Kai Germaschewski. 9 kernel sources by Rusty Russell/Kai Germaschewski.
9 10
10 This program is free software; you can redistribute it and/or modify it 11 */
11 under the terms of the GNU General Public License as published by the
12 Free Software Foundation; either version 2 of the License, or (at your
13 option) any later version.
14
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software Foundation,
22 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
23 12
24#include <stdio.h> 13#include <stdio.h>
25#include <string.h> 14#include <string.h>
diff --git a/scripts/genksyms/genksyms.h b/scripts/genksyms/genksyms.h
index b724a0290c75..2bcdb9bebab4 100644
--- a/scripts/genksyms/genksyms.h
+++ b/scripts/genksyms/genksyms.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/* Generate kernel symbol version hashes. 2/* Generate kernel symbol version hashes.
2 Copyright 1996, 1997 Linux International. 3 Copyright 1996, 1997 Linux International.
3 4
@@ -6,19 +7,7 @@
6 7
7 This file is part of the Linux modutils. 8 This file is part of the Linux modutils.
8 9
9 This program is free software; you can redistribute it and/or modify it 10 */
10 under the terms of the GNU General Public License as published by the
11 Free Software Foundation; either version 2 of the License, or (at your
12 option) any later version.
13
14 This program is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software Foundation,
21 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
22 11
23#ifndef MODUTILS_GENKSYMS_H 12#ifndef MODUTILS_GENKSYMS_H
24#define MODUTILS_GENKSYMS_H 1 13#define MODUTILS_GENKSYMS_H 1
diff --git a/scripts/gfp-translate b/scripts/gfp-translate
index c9230e158a8f..b2ce416d944b 100755
--- a/scripts/gfp-translate
+++ b/scripts/gfp-translate
@@ -1,7 +1,7 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0-only
2# Translate the bits making up a GFP mask 3# Translate the bits making up a GFP mask
3# (c) 2009, Mel Gorman <mel@csn.ul.ie> 4# (c) 2009, Mel Gorman <mel@csn.ul.ie>
4# Licensed under the terms of the GNU GPL License version 2
5SOURCE= 5SOURCE=
6GFPMASK=none 6GFPMASK=none
7 7
diff --git a/scripts/kconfig/tests/err_recursive_inc/expected_stderr b/scripts/kconfig/tests/err_recursive_inc/expected_stderr
index 6b582eee2176..b070a31fdfeb 100644
--- a/scripts/kconfig/tests/err_recursive_inc/expected_stderr
+++ b/scripts/kconfig/tests/err_recursive_inc/expected_stderr
@@ -1,6 +1,6 @@
1Recursive inclusion detected. 1Recursive inclusion detected.
2Inclusion path: 2Inclusion path:
3 current file : Kconfig.inc1 3 current file : Kconfig.inc1
4 included from: Kconfig.inc3:1 4 included from: Kconfig.inc3:2
5 included from: Kconfig.inc2:3 5 included from: Kconfig.inc2:4
6 included from: Kconfig.inc1:4 6 included from: Kconfig.inc1:5
diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl
index ef9e5b2a1614..b2d8b8aa2d99 100755
--- a/scripts/leaking_addresses.pl
+++ b/scripts/leaking_addresses.pl
@@ -1,7 +1,7 @@
1#!/usr/bin/env perl 1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0-only
2# 3#
3# (c) 2017 Tobin C. Harding <me@tobin.cc> 4# (c) 2017 Tobin C. Harding <me@tobin.cc>
4# Licensed under the terms of the GNU GPL License version 2
5# 5#
6# leaking_addresses.pl: Scan the kernel for potential leaking addresses. 6# leaking_addresses.pl: Scan the kernel for potential leaking addresses.
7# - Scans dmesg output. 7# - Scans dmesg output.
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
index 70dcfb6b3de1..e476caf52414 100755
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -1,4 +1,5 @@
1#!/usr/bin/env perl 1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0-only
2 3
3use File::Basename; 4use File::Basename;
4use Math::BigInt; 5use Math::BigInt;
@@ -8,10 +9,6 @@ use Getopt::Long;
8# 9#
9# This file is part of the Linux kernel 10# This file is part of the Linux kernel
10# 11#
11# This program file is free software; you can redistribute it and/or modify it
12# under the terms of the GNU General Public License as published by the
13# Free Software Foundation; version 2 of the License.
14#
15# Authors: 12# Authors:
16# Arjan van de Ven <arjan@linux.intel.com> 13# Arjan van de Ven <arjan@linux.intel.com>
17 14
diff --git a/scripts/objdiff b/scripts/objdiff
index 4fb5d6796893..72b0b63c3fe1 100755
--- a/scripts/objdiff
+++ b/scripts/objdiff
@@ -1,11 +1,11 @@
1#!/bin/bash 1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0-only
2 3
3# objdiff - a small script for validating that a commit or series of commits 4# objdiff - a small script for validating that a commit or series of commits
4# didn't change object code. 5# didn't change object code.
5# 6#
6# Copyright 2014, Jason Cooper <jason@lakedaemon.net> 7# Copyright 2014, Jason Cooper <jason@lakedaemon.net>
7# 8#
8# Licensed under the terms of the GNU GPL version 2
9 9
10# usage example: 10# usage example:
11# 11#
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 27b42d5b6c4f..ca7f46b562a4 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -104,7 +104,7 @@ clean-dirs += $(objtree)/snap/
104# --------------------------------------------------------------------------- 104# ---------------------------------------------------------------------------
105tar%pkg: FORCE 105tar%pkg: FORCE
106 $(MAKE) -f $(srctree)/Makefile 106 $(MAKE) -f $(srctree)/Makefile
107 $(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@ 107 +$(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@
108 108
109clean-dirs += $(objtree)/tar-install/ 109clean-dirs += $(objtree)/tar-install/
110 110
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
index a50a2aa963ad..8387a9bc064a 100644
--- a/scripts/recordmcount.c
+++ b/scripts/recordmcount.c
@@ -1,8 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * recordmcount.c: construct a table of the locations of calls to 'mcount' 3 * recordmcount.c: construct a table of the locations of calls to 'mcount'
3 * so that ftrace can find them quickly. 4 * so that ftrace can find them quickly.
4 * Copyright 2009 John F. Reiser <jreiser@BitWagon.com>. All rights reserved. 5 * Copyright 2009 John F. Reiser <jreiser@BitWagon.com>. All rights reserved.
5 * Licensed under the GNU General Public License, version 2 (GPLv2).
6 * 6 *
7 * Restructured to fit Linux format, as well as other updates: 7 * Restructured to fit Linux format, as well as other updates:
8 * Copyright 2010 Steven Rostedt <srostedt@redhat.com>, Red Hat Inc. 8 * Copyright 2010 Steven Rostedt <srostedt@redhat.com>, Red Hat Inc.
diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h
index 2e7793735e14..13c5e6c8829c 100644
--- a/scripts/recordmcount.h
+++ b/scripts/recordmcount.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * recordmcount.h 3 * recordmcount.h
3 * 4 *
@@ -15,8 +16,6 @@
15 * 16 *
16 * This conversion to macros was done by: 17 * This conversion to macros was done by:
17 * Copyright 2010 Steven Rostedt <srostedt@redhat.com>, Red Hat Inc. 18 * Copyright 2010 Steven Rostedt <srostedt@redhat.com>, Red Hat Inc.
18 *
19 * Licensed under the GNU General Public License, version 2 (GPLv2).
20 */ 19 */
21#undef append_func 20#undef append_func
22#undef is_fake_mcount 21#undef is_fake_mcount
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index d24759214efd..3f77a5d695c1 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -1,6 +1,6 @@
1#!/usr/bin/env perl 1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0-only
2# (c) 2008, Steven Rostedt <srostedt@redhat.com> 3# (c) 2008, Steven Rostedt <srostedt@redhat.com>
3# Licensed under the terms of the GNU GPL License version 2
4# 4#
5# recordmcount.pl - makes a section called __mcount_loc that holds 5# recordmcount.pl - makes a section called __mcount_loc that holds
6# all the offsets to the calls to mcount. 6# all the offsets to the calls to mcount.
diff --git a/scripts/selinux/mdp/mdp.c b/scripts/selinux/mdp/mdp.c
index 18fd6143888b..576d11a60417 100644
--- a/scripts/selinux/mdp/mdp.c
+++ b/scripts/selinux/mdp/mdp.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * 3 *
3 * mdp - make dummy policy 4 * mdp - make dummy policy
@@ -5,20 +6,6 @@
5 * When pointed at a kernel tree, builds a dummy policy for that kernel 6 * When pointed at a kernel tree, builds a dummy policy for that kernel
6 * with exactly one type with full rights to itself. 7 * with exactly one type with full rights to itself.
7 * 8 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 *
22 * Copyright (C) IBM Corporation, 2006 9 * Copyright (C) IBM Corporation, 2006
23 * 10 *
24 * Authors: Serge E. Hallyn <serue@us.ibm.com> 11 * Authors: Serge E. Hallyn <serue@us.ibm.com>
diff --git a/scripts/show_delta b/scripts/show_delta
index 5b365009e6a3..264399307c4f 100755
--- a/scripts/show_delta
+++ b/scripts/show_delta
@@ -1,4 +1,5 @@
1#!/usr/bin/python 1#!/usr/bin/python
2# SPDX-License-Identifier: GPL-2.0-only
2# 3#
3# show_deltas: Read list of printk messages instrumented with 4# show_deltas: Read list of printk messages instrumented with
4# time data, and format with time deltas. 5# time data, and format with time deltas.
@@ -7,7 +8,6 @@
7# 8#
8# Copyright 2003 Sony Corporation 9# Copyright 2003 Sony Corporation
9# 10#
10# GPL 2.0 applies.
11 11
12import sys 12import sys
13import string 13import string
diff --git a/scripts/sortextable.c b/scripts/sortextable.c
index 365a907f98b3..55768654e3c6 100644
--- a/scripts/sortextable.c
+++ b/scripts/sortextable.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * sortextable.c: Sort the kernel's exception table 3 * sortextable.c: Sort the kernel's exception table
3 * 4 *
@@ -6,7 +7,6 @@
6 * Based on code taken from recortmcount.c which is: 7 * Based on code taken from recortmcount.c which is:
7 * 8 *
8 * Copyright 2009 John F. Reiser <jreiser@BitWagon.com>. All rights reserved. 9 * Copyright 2009 John F. Reiser <jreiser@BitWagon.com>. All rights reserved.
9 * Licensed under the GNU General Public License, version 2 (GPLv2).
10 * 10 *
11 * Restructured to fit Linux format, as well as other updates: 11 * Restructured to fit Linux format, as well as other updates:
12 * Copyright 2010 Steven Rostedt <srostedt@redhat.com>, Red Hat Inc. 12 * Copyright 2010 Steven Rostedt <srostedt@redhat.com>, Red Hat Inc.
diff --git a/scripts/sortextable.h b/scripts/sortextable.h
index ba8700428e21..d4b3f6c40f02 100644
--- a/scripts/sortextable.h
+++ b/scripts/sortextable.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
1/* 2/*
2 * sortextable.h 3 * sortextable.h
3 * 4 *
@@ -7,9 +8,6 @@
7 * 8 *
8 * Copyright 2009 John F. Reiser <jreiser@BitWagon.com>. All rights reserved. 9 * Copyright 2009 John F. Reiser <jreiser@BitWagon.com>. All rights reserved.
9 * Copyright 2010 Steven Rostedt <srostedt@redhat.com>, Red Hat Inc. 10 * Copyright 2010 Steven Rostedt <srostedt@redhat.com>, Red Hat Inc.
10 *
11 *
12 * Licensed under the GNU General Public License, version 2 (GPLv2).
13 */ 11 */
14 12
15#undef extable_ent_size 13#undef extable_ent_size
diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py
index 33df646618e2..6374e078a5f2 100755
--- a/scripts/spdxcheck.py
+++ b/scripts/spdxcheck.py
@@ -32,7 +32,8 @@ class SPDXdata(object):
32def read_spdxdata(repo): 32def read_spdxdata(repo):
33 33
34 # The subdirectories of LICENSES in the kernel source 34 # The subdirectories of LICENSES in the kernel source
35 license_dirs = [ "preferred", "deprecated", "exceptions", "dual" ] 35 # Note: exceptions needs to be parsed as last directory.
36 license_dirs = [ "preferred", "dual", "deprecated", "exceptions" ]
36 lictree = repo.head.commit.tree['LICENSES'] 37 lictree = repo.head.commit.tree['LICENSES']
37 38
38 spdx = SPDXdata() 39 spdx = SPDXdata()
@@ -58,13 +59,13 @@ def read_spdxdata(repo):
58 elif l.startswith('SPDX-Licenses:'): 59 elif l.startswith('SPDX-Licenses:'):
59 for lic in l.split(':')[1].upper().strip().replace(' ', '').replace('\t', '').split(','): 60 for lic in l.split(':')[1].upper().strip().replace(' ', '').replace('\t', '').split(','):
60 if not lic in spdx.licenses: 61 if not lic in spdx.licenses:
61 raise SPDXException(None, 'Exception %s missing license %s' %(ex, lic)) 62 raise SPDXException(None, 'Exception %s missing license %s' %(exception, lic))
62 spdx.exceptions[exception].append(lic) 63 spdx.exceptions[exception].append(lic)
63 64
64 elif l.startswith("License-Text:"): 65 elif l.startswith("License-Text:"):
65 if exception: 66 if exception:
66 if not len(spdx.exceptions[exception]): 67 if not len(spdx.exceptions[exception]):
67 raise SPDXException(el, 'Exception %s is missing SPDX-Licenses' %excid) 68 raise SPDXException(el, 'Exception %s is missing SPDX-Licenses' %exception)
68 spdx.exception_files += 1 69 spdx.exception_files += 1
69 else: 70 else:
70 spdx.license_files += 1 71 spdx.license_files += 1
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index f6a5c0bae31e..9be208db88d3 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -1,19 +1,11 @@
1#!/usr/bin/perl 1#!/usr/bin/perl
2# SPDX-License-Identifier: GPL-2.0-or-later
2use strict; 3use strict;
3 4
4# Copyright (c) 2017 Mauro Carvalho Chehab <mchehab@kernel.org> 5# Copyright (c) 2017 Mauro Carvalho Chehab <mchehab@kernel.org>
5# 6#
6# This program is free software; you can redistribute it and/or
7# modify it under the terms of the GNU General Public License
8# as published by the Free Software Foundation; either version 2
9# of the License, or (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15 7
16my $virtenv_dir = "sphinx_1.4"; 8my $conf = "Documentation/conf.py";
17my $requirement_file = "Documentation/sphinx/requirements.txt"; 9my $requirement_file = "Documentation/sphinx/requirements.txt";
18 10
19# 11#
@@ -26,7 +18,9 @@ my $need = 0;
26my $optional = 0; 18my $optional = 0;
27my $need_symlink = 0; 19my $need_symlink = 0;
28my $need_sphinx = 0; 20my $need_sphinx = 0;
21my $rec_sphinx_upgrade = 0;
29my $install = ""; 22my $install = "";
23my $virtenv_dir = "sphinx_";
30 24
31# 25#
32# Command line arguments 26# Command line arguments
@@ -201,13 +195,15 @@ sub check_missing_tex($)
201 } 195 }
202} 196}
203 197
204sub check_sphinx() 198sub get_sphinx_fname()
205{ 199{
206 return if findprog("sphinx-build"); 200 my $fname = "sphinx-build";
201 return $fname if findprog($fname);
207 202
208 if (findprog("sphinx-build-3")) { 203 $fname = "sphinx-build-3";
204 if (findprog($fname)) {
209 $need_symlink = 1; 205 $need_symlink = 1;
210 return; 206 return $fname;
211 } 207 }
212 208
213 if ($virtualenv) { 209 if ($virtualenv) {
@@ -219,6 +215,73 @@ sub check_sphinx()
219 } else { 215 } else {
220 add_package("python-sphinx", 0); 216 add_package("python-sphinx", 0);
221 } 217 }
218
219 return "";
220}
221
222sub check_sphinx()
223{
224 my $min_version;
225 my $rec_version;
226 my $cur_version;
227
228 open IN, $conf or die "Can't open $conf";
229 while (<IN>) {
230 if (m/^\s*needs_sphinx\s*=\s*[\'\"]([\d\.]+)[\'\"]/) {
231 $min_version=$1;
232 last;
233 }
234 }
235 close IN;
236
237 die "Can't get needs_sphinx version from $conf" if (!$min_version);
238
239 open IN, $requirement_file or die "Can't open $requirement_file";
240 while (<IN>) {
241 if (m/^\s*Sphinx\s*==\s*([\d\.]+)$/) {
242 $rec_version=$1;
243 last;
244 }
245 }
246 close IN;
247
248 die "Can't get recommended sphinx version from $requirement_file" if (!$min_version);
249
250 $virtenv_dir .= $rec_version;
251
252 my $sphinx = get_sphinx_fname();
253 return if ($sphinx eq "");
254
255 open IN, "$sphinx --version 2>&1 |" or die "$sphinx returned an error";
256 while (<IN>) {
257 if (m/^\s*sphinx-build\s+([\d\.]+)$/) {
258 $cur_version=$1;
259 last;
260 }
261 # Sphinx 1.2.x uses a different format
262 if (m/^\s*Sphinx.*\s+([\d\.]+)$/) {
263 $cur_version=$1;
264 last;
265 }
266 }
267 close IN;
268
269 die "$sphinx didn't return its version" if (!$cur_version);
270
271 printf "Sphinx version %s (minimal: %s, recommended >= %s)\n",
272 $cur_version, $min_version, $rec_version;
273
274 if ($cur_version lt $min_version) {
275 print "Warning: Sphinx version should be >= $min_version\n\n";
276 $need_sphinx = 1;
277 return;
278 }
279
280 if ($cur_version lt $rec_version) {
281 print "Warning: It is recommended at least Sphinx version $rec_version.\n";
282 print " To upgrade, use:\n\n";
283 $rec_sphinx_upgrade = 1;
284 }
222} 285}
223 286
224# 287#
@@ -540,7 +603,7 @@ sub check_needs()
540 printf "\tsudo ln -sf %s /usr/bin/sphinx-build\n\n", 603 printf "\tsudo ln -sf %s /usr/bin/sphinx-build\n\n",
541 which("sphinx-build-3"); 604 which("sphinx-build-3");
542 } 605 }
543 if ($need_sphinx) { 606 if ($need_sphinx || $rec_sphinx_upgrade) {
544 my $activate = "$virtenv_dir/bin/activate"; 607 my $activate = "$virtenv_dir/bin/activate";
545 if (-e "$ENV{'PWD'}/$activate") { 608 if (-e "$ENV{'PWD'}/$activate") {
546 printf "\nNeed to activate virtualenv with:\n"; 609 printf "\nNeed to activate virtualenv with:\n";
@@ -554,7 +617,8 @@ sub check_needs()
554 printf "\t$virtualenv $virtenv_dir\n"; 617 printf "\t$virtualenv $virtenv_dir\n";
555 printf "\t. $activate\n"; 618 printf "\t. $activate\n";
556 printf "\tpip install -r $requirement_file\n"; 619 printf "\tpip install -r $requirement_file\n";
557 $need++; 620
621 $need++ if (!$rec_sphinx_upgrade);
558 } 622 }
559 } 623 }
560 printf "\n"; 624 printf "\n";
diff --git a/scripts/tracing/draw_functrace.py b/scripts/tracing/draw_functrace.py
index 9b6dd4f36335..b65735758520 100755
--- a/scripts/tracing/draw_functrace.py
+++ b/scripts/tracing/draw_functrace.py
@@ -1,8 +1,8 @@
1#!/usr/bin/python 1#!/usr/bin/python
2# SPDX-License-Identifier: GPL-2.0-only
2 3
3""" 4"""
4Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> 5Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
5Licensed under the terms of the GNU GPL License version 2
6 6
7This script parses a trace provided by the function tracer in 7This script parses a trace provided by the function tracer in
8kernel/trace/trace_functions.c 8kernel/trace/trace_functions.c