aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/adjust_autoksyms.sh4
-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/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
-rwxr-xr-xscripts/dtc/dt_to_config3
53 files changed, 159 insertions, 112 deletions
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/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/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/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;