Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505

Based on 1 normalized pattern(s):

gplv2

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 58 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081207.556988620@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Thomas Gleixner and committed by
Greg Kroah-Hartman
7f904d7e 775c8a3d

+163 -118
+1 -2
arch/powerpc/kernel/swsusp_64.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * PowerPC 64-bit swsusp implementation 3 4 * 4 5 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> 5 - * 6 - * GPLv2 7 6 */ 8 7 9 8 #include <asm/iommu.h>
+1 -2
arch/powerpc/kernel/swsusp_asm64.S
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 2 3 * PowerPC 64-bit swsusp implementation 3 4 * 4 5 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> 5 - * 6 - * GPLv2 7 6 */ 8 7 9 8 #include <linux/threads.h>
+1 -2
drivers/char/tpm/tpmrm-dev.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * Copyright (C) 2017 James.Bottomley@HansenPartnership.com 3 - * 4 - * GPLv2 5 4 */ 6 5 #include <linux/slab.h> 7 6 #include "tpm-dev.h"
+1 -3
net/mac80211/debugfs.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * mac80211 debugfs for wireless PHYs 3 4 * 4 5 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> 5 6 * Copyright 2013-2014 Intel Mobile Communications GmbH 6 7 * Copyright (C) 2018 - 2019 Intel Corporation 7 - * 8 - * GPLv2 9 - * 10 8 */ 11 9 12 10 #include <linux/debugfs.h>
+2 -1
samples/bpf/xdp_redirect_cpu_user.c
··· 1 - /* GPLv2 Copyright(c) 2017 Jesper Dangaard Brouer, Red Hat, Inc. 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* Copyright(c) 2017 Jesper Dangaard Brouer, Red Hat, Inc. 2 3 */ 3 4 static const char *__doc__ = 4 5 " XDP redirect with a CPU-map type \"BPF_MAP_TYPE_CPUMAP\"";
+3 -2
scripts/coccinelle/api/alloc/alloc_cast.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Remove casting the values returned by memory allocation functions 2 3 /// like kmalloc, kzalloc, kmem_cache_alloc, kmem_cache_zalloc etc. 3 4 /// ··· 9 8 //# need some reformatting. 10 9 // 11 10 // Confidence: High 12 - // Copyright: (C) 2014 Himangi Saraogi GPLv2. 13 - // Copyright: (C) 2017 Himanshu Jha GPLv2. 11 + // Copyright: (C) 2014 Himangi Saraogi 12 + // Copyright: (C) 2017 Himanshu Jha 14 13 // Comments: 15 14 // Options: --no-includes --include-headers 16 15 //
+2 -1
scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// 2 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 6 // Options: --no-includes --include-headers 6 7 // 7 8 // Keywords: dma_pool_zalloc, pci_pool_zalloc
+4 -3
scripts/coccinelle/api/alloc/zalloc-simple.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// 2 3 /// Use zeroing allocator rather than allocator followed by memset with 0 3 4 /// ··· 7 6 /// matched code has to be contiguous 8 7 /// 9 8 // Confidence: High 10 - // Copyright: (C) 2009-2010 Julia Lawall, Nicolas Palix, DIKU. GPLv2. 11 - // Copyright: (C) 2009-2010 Gilles Muller, INRIA/LiP6. GPLv2. 12 - // Copyright: (C) 2017 Himanshu Jha GPLv2. 9 + // Copyright: (C) 2009-2010 Julia Lawall, Nicolas Palix, DIKU. 10 + // Copyright: (C) 2009-2010 Gilles Muller, INRIA/LiP6. 11 + // Copyright: (C) 2017 Himanshu Jha 13 12 // URL: http://coccinelle.lip6.fr/rules/kzalloc.html 14 13 // Options: --no-includes --include-headers 15 14 //
+2 -1
scripts/coccinelle/api/check_bq27xxx_data.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Detect BQ27XXX_DATA structures with identical registers, dm registers or 2 3 /// properties. 3 4 //# Doesn't unfold macros used in register or property fields. 4 5 //# Requires OCaml scripting 5 6 /// 6 7 // Confidence: High 7 - // Copyright: (C) 2017 Julia Lawall, Inria/LIP6, GPLv2. 8 + // Copyright: (C) 2017 Julia Lawall, Inria/LIP6, 8 9 // URL: http://coccinelle.lip6.fr/ 9 10 // Requires: 1.0.7 10 11 // Keywords: BQ27XXX_DATA
+4 -3
scripts/coccinelle/api/err_cast.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// 2 3 /// Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) 3 4 /// 4 5 // Confidence: High 5 - // Copyright: (C) 2009, 2010 Nicolas Palix, DIKU. GPLv2. 6 - // Copyright: (C) 2009, 2010 Julia Lawall, DIKU. GPLv2. 7 - // Copyright: (C) 2009, 2010 Gilles Muller, INRIA/LiP6. GPLv2. 6 + // Copyright: (C) 2009, 2010 Nicolas Palix, DIKU. 7 + // Copyright: (C) 2009, 2010 Julia Lawall, DIKU. 8 + // Copyright: (C) 2009, 2010 Gilles Muller, INRIA/LiP6. 8 9 // URL: http://coccinelle.lip6.fr/ 9 10 // Options: 10 11 //
+4 -3
scripts/coccinelle/api/kstrdup.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Use kstrdup rather than duplicating its implementation 2 3 /// 3 4 // Confidence: High 4 - // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 5 - // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 6 - // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 5 + // Copyright: (C) 2010-2012 Nicolas Palix. 6 + // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. 7 + // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. 7 8 // URL: http://coccinelle.lip6.fr/ 8 9 // Comments: 9 10 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/api/memdup.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Use kmemdup rather than duplicating its implementation 2 3 /// 3 4 // Confidence: High 4 - // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 5 - // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 6 - // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 5 + // Copyright: (C) 2010-2012 Nicolas Palix. 6 + // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. 7 + // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. 7 8 // URL: http://coccinelle.lip6.fr/ 8 9 // Comments: 9 10 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/api/memdup_user.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Use memdup_user rather than duplicating its implementation 2 3 /// This is a little bit restricted to reduce false positives 3 4 /// 4 5 // Confidence: High 5 - // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 6 - // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 7 - // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 6 + // Copyright: (C) 2010-2012 Nicolas Palix. 7 + // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. 8 + // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. 8 9 // URL: http://coccinelle.lip6.fr/ 9 10 // Comments: 10 11 // Options: --no-includes --include-headers
+2 -1
scripts/coccinelle/api/pm_runtime.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Make sure pm_runtime_* calls does not use unnecessary IS_ERR_VALUE 2 3 /// 3 4 // Keywords: pm_runtime 4 5 // Confidence: Medium 5 - // Copyright (C) 2013 Texas Instruments Incorporated - GPLv2. 6 + // Copyright (C) 2013 Texas Instruments Incorporated - 6 7 // URL: http://coccinelle.lip6.fr/ 7 8 // Options: --include-headers 8 9
+3 -2
scripts/coccinelle/api/ptr_ret.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// 2 3 /// Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR 3 4 /// 4 5 // Confidence: High 5 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 6 - // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 6 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 7 + // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 7 8 // URL: http://coccinelle.lip6.fr/ 8 9 // Options: --no-includes --include-headers 9 10 //
+4 -3
scripts/coccinelle/api/resource_size.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// 2 3 /// Use resource_size function on resource object 3 4 /// instead of explicit computation. 4 5 /// 5 6 // Confidence: High 6 - // Copyright: (C) 2009, 2010 Nicolas Palix, DIKU. GPLv2. 7 - // Copyright: (C) 2009, 2010 Julia Lawall, DIKU. GPLv2. 8 - // Copyright: (C) 2009, 2010 Gilles Muller, INRIA/LiP6. GPLv2. 7 + // Copyright: (C) 2009, 2010 Nicolas Palix, DIKU. 8 + // Copyright: (C) 2009, 2010 Julia Lawall, DIKU. 9 + // Copyright: (C) 2009, 2010 Gilles Muller, INRIA/LiP6. 9 10 // URL: http://coccinelle.lip6.fr/ 10 11 // Options: 11 12 //
+3 -2
scripts/coccinelle/free/clk_put.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find missing clk_puts. 2 3 /// 3 4 //# This only signals a missing clk_put when there is a clk_put later ··· 6 5 //# False positives can be due to loops. 7 6 // 8 7 // Confidence: Moderate 9 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 10 - // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 8 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 9 + // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 11 10 // URL: http://coccinelle.lip6.fr/ 12 11 // Comments: 13 12 // Options:
+3 -2
scripts/coccinelle/free/devm_free.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find uses of standard freeing functons on values allocated using devm_ 2 3 /// functions. Values allocated using the devm_functions are freed when 3 4 /// the device is detached, and thus the use of the standard freeing ··· 15 14 /// less reliable in these cases. 16 15 /// 17 16 // Confidence: Moderate 18 - // Copyright: (C) 2011 Julia Lawall, INRIA/LIP6. GPLv2. 19 - // Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2. 17 + // Copyright: (C) 2011 Julia Lawall, INRIA/LIP6. 18 + // Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. 20 19 // URL: http://coccinelle.lip6.fr/ 21 20 // Comments: 22 21 // Options: --no-includes --include-headers
+2 -1
scripts/coccinelle/free/ifnullfree.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// NULL check before some freeing functions is not needed. 2 3 /// 3 4 /// Based on checkpatch warning 4 5 /// "kfree(NULL) is safe this check is probably not required" 5 6 /// and kfreeaddr.cocci by Julia Lawall. 6 7 /// 7 - // Copyright: (C) 2014 Fabian Frederick. GPLv2. 8 + // Copyright: (C) 2014 Fabian Frederick. 8 9 // Comments: - 9 10 // Options: --no-includes --include-headers 10 11
+3 -2
scripts/coccinelle/free/iounmap.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find missing iounmaps. 2 3 /// 3 4 //# This only signals a missing iounmap when there is an iounmap later ··· 6 5 //# False positives can be due to loops. 7 6 // 8 7 // Confidence: Moderate 9 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 10 - // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 8 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 9 + // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 11 10 // URL: http://coccinelle.lip6.fr/ 12 11 // Comments: 13 12 // Options:
+4 -3
scripts/coccinelle/free/kfree.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find a use after free. 2 3 //# Values of variables may imply that some 3 4 //# execution paths are not possible, resulting in false positives. ··· 6 5 //# SCTP_DBG_OBJCNT_DEC that do not actually evaluate their argument 7 6 /// 8 7 // Confidence: Moderate 9 - // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 10 - // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 11 - // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 8 + // Copyright: (C) 2010-2012 Nicolas Palix. 9 + // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. 10 + // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. 12 11 // URL: http://coccinelle.lip6.fr/ 13 12 // Comments: 14 13 // Options: --no-includes --include-headers
+2 -1
scripts/coccinelle/free/kfreeaddr.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Free of a structure field 2 3 /// 3 4 // Confidence: High 4 - // Copyright: (C) 2013 Julia Lawall, INRIA/LIP6. GPLv2. 5 + // Copyright: (C) 2013 Julia Lawall, INRIA/LIP6. 5 6 // URL: http://coccinelle.lip6.fr/ 6 7 // Comments: 7 8 // Options: --no-includes --include-headers
+2 -1
scripts/coccinelle/free/pci_free_consistent.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find missing pci_free_consistent for every pci_alloc_consistent. 2 3 /// 3 4 // Confidence: Moderate 4 - // Copyright: (C) 2013 Petr Strnad. GPLv2. 5 + // Copyright: (C) 2013 Petr Strnad. 5 6 // URL: http://coccinelle.lip6.fr/ 6 7 // Keywords: pci_free_consistent, pci_alloc_consistent 7 8 // Options: --no-includes --include-headers
+2 -1
scripts/coccinelle/iterators/device_node_continue.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Device node iterators put the previous value of the index variable, so an 2 3 /// explicit put causes a double put. 3 4 /// 4 5 // Confidence: High 5 - // Copyright: (C) 2015 Julia Lawall, Inria. GPLv2. 6 + // Copyright: (C) 2015 Julia Lawall, Inria. 6 7 // URL: http://coccinelle.lip6.fr/ 7 8 // Options: --no-includes --include-headers 8 9 // Requires: 1.0.4
+4 -3
scripts/coccinelle/iterators/fen.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// These iterators only exit normally when the loop cursor is NULL, so there 2 3 /// is no point to call of_node_put on the final value. 3 4 /// 4 5 // Confidence: High 5 - // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 6 - // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 7 - // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 6 + // Copyright: (C) 2010-2012 Nicolas Palix. 7 + // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. 8 + // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. 8 9 // URL: http://coccinelle.lip6.fr/ 9 10 // Comments: 10 11 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/iterators/itnull.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Many iterators have the property that the first argument is always bound 2 3 /// to a real list element, never NULL. 3 4 //# False positives arise for some iterators that do not have this property, ··· 7 6 //# or return). 8 7 /// 9 8 // Confidence: Moderate 10 - // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 11 - // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 12 - // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 9 + // Copyright: (C) 2010-2012 Nicolas Palix. 10 + // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. 11 + // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. 13 12 // URL: http://coccinelle.lip6.fr/ 14 13 // Comments: 15 14 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/iterators/list_entry_update.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// list_for_each_entry uses its first argument to get from one element of 2 3 /// the list to the next, so it is usually not a good idea to reassign it. 3 4 /// The first rule finds such a reassignment and the second rule checks 4 5 /// that there is a path from the reassignment back to the top of the loop. 5 6 /// 6 7 // Confidence: High 7 - // Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 8 - // Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 9 - // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 8 + // Copyright: (C) 2010 Nicolas Palix, DIKU. 9 + // Copyright: (C) 2010 Julia Lawall, DIKU. 10 + // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. 10 11 // URL: http://coccinelle.lip6.fr/ 11 12 // Comments: 12 13 // Options: --no-includes --include-headers
+3 -2
scripts/coccinelle/iterators/use_after_iter.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// If list_for_each_entry, etc complete a traversal of the list, the iterator 2 3 /// variable ends up pointing to an address at an offset from the list head, 3 4 /// and not a meaningful structure. Thus this value should not be used after ··· 8 7 //#may also cause a report to be a false positive. 9 8 /// 10 9 // Confidence: Moderate 11 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 12 - // Copyright: (C) 2012 Gilles Muller, INRIA/LIP6. GPLv2. 10 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 11 + // Copyright: (C) 2012 Gilles Muller, INRIA/LIP6. 13 12 // URL: http://coccinelle.lip6.fr/ 14 13 // Comments: 15 14 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/locks/call_kern.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find functions that refer to GFP_KERNEL but are called with locks held. 2 3 //# The proposed change of converting the GFP_KERNEL is not necessarily the 3 4 //# correct one. It may be desired to unlock the lock, or to not call the 4 5 //# function under the lock in the first place. 5 6 /// 6 7 // Confidence: Moderate 7 - // Copyright: (C) 2012 Nicolas Palix. GPLv2. 8 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 9 - // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 8 + // Copyright: (C) 2012 Nicolas Palix. 9 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 10 + // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 10 11 // URL: http://coccinelle.lip6.fr/ 11 12 // Comments: 12 13 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/locks/double_lock.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find double locks. False positives may occur when some paths cannot 2 3 /// occur at execution, due to the values of variables, and when there is 3 4 /// an intervening function call that releases the lock. 4 5 /// 5 6 // Confidence: Moderate 6 - // Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 7 - // Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 8 - // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 7 + // Copyright: (C) 2010 Nicolas Palix, DIKU. 8 + // Copyright: (C) 2010 Julia Lawall, DIKU. 9 + // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. 9 10 // URL: http://coccinelle.lip6.fr/ 10 11 // Comments: 11 12 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/locks/flags.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find nested lock+irqsave functions that use the same flags variables 2 3 /// 3 4 // Confidence: High 4 - // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 5 - // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 6 - // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 5 + // Copyright: (C) 2010-2012 Nicolas Palix. 6 + // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. 7 + // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. 7 8 // URL: http://coccinelle.lip6.fr/ 8 9 // Comments: 9 10 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/locks/mini_lock.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find missing unlocks. This semantic match considers the specific case 2 3 /// where the unlock is missing from an if branch, and there is a lock 3 4 /// before the if and an unlock after the if. False positives are due to ··· 7 6 /// function call that releases the lock. 8 7 /// 9 8 // Confidence: Moderate 10 - // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 11 - // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 12 - // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 9 + // Copyright: (C) 2010-2012 Nicolas Palix. 10 + // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. 11 + // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. 13 12 // URL: http://coccinelle.lip6.fr/ 14 13 // Comments: 15 14 // Options: --no-includes --include-headers
+2 -1
scripts/coccinelle/misc/array_size.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element 2 3 /// 3 4 //# This makes an effort to find cases where ARRAY_SIZE can be used such as ··· 7 6 //# division of the two sizeofs by ARRAY_SIZE. 8 7 // 9 8 // Confidence: High 10 - // Copyright: (C) 2014 Himangi Saraogi. GPLv2. 9 + // Copyright: (C) 2014 Himangi Saraogi. 11 10 // Comments: 12 11 // Options: --no-includes --include-headers 13 12
+2 -1
scripts/coccinelle/misc/badty.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Correct the size argument to alloc functions 2 3 /// 3 4 //# This makes an effort to find cases where the argument to sizeof is wrong ··· 9 8 //# may need some reformatting. 10 9 // 11 10 // Confidence: Moderate 12 - // Copyright: (C) 2014 Himangi Saraogi. GPLv2. 11 + // Copyright: (C) 2014 Himangi Saraogi. 13 12 // Comments: 14 13 // Options: 15 14
+2 -1
scripts/coccinelle/misc/boolconv.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Remove unneeded conversion to bool 2 3 /// 3 4 //# Relational and logical operators evaluate to bool, 4 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 8 9 virtual patch 9 10 virtual context
+3 -2
scripts/coccinelle/misc/boolinit.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Bool initializations should use true and false. Bool tests don't need 2 3 /// comparisons. Based on contributions from Joe Perches, Rusty Russell 3 4 /// and Bruce W Allan. 4 5 /// 5 6 // Confidence: High 6 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 7 - // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 7 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 8 + // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 8 9 // URL: http://coccinelle.lip6.fr/ 9 10 // Options: --include-headers 10 11
+2 -1
scripts/coccinelle/misc/bugon.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Use BUG_ON instead of a if condition followed by BUG. 2 3 /// 3 4 //# This makes an effort to find cases where BUG() follows an if ··· 7 6 //# as argument. 8 7 // 9 8 // Confidence: High 10 - // Copyright: (C) 2014 Himangi Saraogi. GPLv2. 9 + // Copyright: (C) 2014 Himangi Saraogi. 11 10 // Comments: 12 11 // Options: --no-includes --include-headers 13 12
+2 -1
scripts/coccinelle/misc/cond_no_effect.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 ///Find conditions where if and else branch are functionally 2 3 // identical. 3 4 // ··· 38 37 // All other cases look like bugs or at least lack of documentation 39 38 // 40 39 // Confidence: Moderate 41 - // Copyright: (C) 2016 Nicholas Mc Guire, OSADL. GPLv2. 40 + // Copyright: (C) 2016 Nicholas Mc Guire, OSADL. 42 41 // Comments: 43 42 // Options: --no-includes --include-headers 44 43
+3 -2
scripts/coccinelle/misc/cstptr.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// PTR_ERR should be applied before its argument is reassigned, typically 2 3 /// to NULL 3 4 /// 4 5 // Confidence: High 5 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 6 - // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 6 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 7 + // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 7 8 // URL: http://coccinelle.lip6.fr/ 8 9 // Comments: 9 10 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/misc/doubleinit.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find duplicate field initializations. This has a high rate of false 2 3 /// positives due to #ifdefs, which Coccinelle is not aware of in a structure 3 4 /// initialization. 4 5 /// 5 6 // Confidence: Low 6 - // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 7 - // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 8 - // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 7 + // Copyright: (C) 2010-2012 Nicolas Palix. 8 + // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. 9 + // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. 9 10 // URL: http://coccinelle.lip6.fr/ 10 11 // Comments: requires at least Coccinelle 0.2.4, lex or parse error otherwise 11 12 // Options: --no-includes --include-headers
+3 -2
scripts/coccinelle/misc/ifaddr.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// The address of a variable or field is likely always to be non-zero. 2 3 /// 3 4 // Confidence: High 4 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 5 - // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 5 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 6 + // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 6 7 // URL: http://coccinelle.lip6.fr/ 7 8 // Comments: 8 9 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/misc/ifcol.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find confusingly indented code in or after an if. An if branch should 2 3 /// be indented. The code following an if should not be indented. 3 4 /// Sometimes, code after an if that is indented is actually intended to be ··· 9 8 //# is not visually aligned may be considered to be in the same column. 10 9 // 11 10 // Confidence: Low 12 - // Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 13 - // Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 14 - // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 11 + // Copyright: (C) 2010 Nicolas Palix, DIKU. 12 + // Copyright: (C) 2010 Julia Lawall, DIKU. 13 + // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. 15 14 // URL: http://coccinelle.lip6.fr/ 16 15 // Comments: 17 16 // Options: --no-includes --include-headers
+3 -2
scripts/coccinelle/misc/noderef.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// sizeof when applied to a pointer typed expression gives the size of 2 3 /// the pointer 3 4 /// 4 5 // Confidence: High 5 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 6 - // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 6 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 7 + // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 7 8 // URL: http://coccinelle.lip6.fr/ 8 9 // Comments: 9 10 // Options: --no-includes --include-headers
+3 -2
scripts/coccinelle/misc/orplus.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Check for constants that are added but are used elsewhere as bitmasks 2 3 /// The results should be checked manually to ensure that the nonzero 3 4 /// bits in the two constants are actually disjoint. 4 5 /// 5 6 // Confidence: Moderate 6 - // Copyright: (C) 2013 Julia Lawall, INRIA/LIP6. GPLv2. 7 - // Copyright: (C) 2013 Gilles Muller, INRIA/LIP6. GPLv2. 7 + // Copyright: (C) 2013 Julia Lawall, INRIA/LIP6. 8 + // Copyright: (C) 2013 Gilles Muller, INRIA/LIP6. 8 9 // URL: http://coccinelle.lip6.fr/ 9 10 // Comments: 10 11 // Options: --no-includes --include-headers
+2 -1
scripts/coccinelle/misc/returnvar.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// 2 3 /// Remove unneeded variable used to store return value. 3 4 /// 4 5 // Confidence: Moderate 5 - // Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6. GPLv2. 6 + // Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6. 6 7 // URL: http://coccinelle.lip6.fr/ 7 8 // Comments: Comments on code can be deleted if near code that is removed. 8 9 // "when strict" can be removed to get more hits, but adds false
+2 -1
scripts/coccinelle/misc/semicolon.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// 2 3 /// Remove unneeded semicolon. 3 4 /// 4 5 // Confidence: Moderate 5 - // Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6. GPLv2. 6 + // Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6. 6 7 // URL: http://coccinelle.lip6.fr/ 7 8 // Comments: Some false positives on empty default cases in switch statements. 8 9 // Options: --no-includes --include-headers
+3 -2
scripts/coccinelle/misc/warn.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Use WARN(1,...) rather than printk followed by WARN_ON(1) 2 3 /// 3 4 // Confidence: High 4 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 5 - // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 5 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 6 + // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 6 7 // URL: http://coccinelle.lip6.fr/ 7 8 // Comments: 8 9 // Options: --no-includes --include-headers
+3 -2
scripts/coccinelle/null/badzero.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Compare pointer-typed values to NULL rather than 0 2 3 /// 3 4 //# This makes an effort to choose between !x and x == NULL. !x is used ··· 8 7 //# include path. 9 8 // 10 9 // Confidence: High 11 - // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. 12 - // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. 10 + // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 11 + // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 13 12 // URL: http://coccinelle.lip6.fr/ 14 13 // Requires: 1.0.0 15 14 // Options:
+4 -3
scripts/coccinelle/null/deref_null.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// 2 3 /// A variable is dereferenced under a NULL test. 3 4 /// Even though it is known to be NULL. 4 5 /// 5 6 // Confidence: Moderate 6 - // Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 7 - // Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 8 - // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 7 + // Copyright: (C) 2010 Nicolas Palix, DIKU. 8 + // Copyright: (C) 2010 Julia Lawall, DIKU. 9 + // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. 9 10 // URL: http://coccinelle.lip6.fr/ 10 11 // Comments: -I ... -all_includes can give more complete results 11 12 // Options:
+4 -3
scripts/coccinelle/null/eno.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// The various basic memory allocation functions don't return ERR_PTR 2 3 /// 3 4 // Confidence: High 4 - // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. 5 - // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. 6 - // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. 5 + // Copyright: (C) 2010-2012 Nicolas Palix. 6 + // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. 7 + // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. 7 8 // URL: http://coccinelle.lip6.fr/ 8 9 // Comments: 9 10 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/null/kmerr.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// This semantic patch looks for kmalloc etc that are not followed by a 2 3 /// NULL check. It only gives a report in the case where there is some 3 4 /// error handling code later in the function, which may be helpful ··· 6 5 /// should be. 7 6 /// 8 7 // Confidence: High 9 - // Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 10 - // Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 11 - // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 8 + // Copyright: (C) 2010 Nicolas Palix, DIKU. 9 + // Copyright: (C) 2010 Julia Lawall, DIKU. 10 + // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. 12 11 // URL: http://coccinelle.lip6.fr/ 13 12 // Comments: 14 13 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/tests/doublebitand.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find bit operations that include the same argument more than once 2 3 //# One source of false positives is when the argument performs a side 3 4 //# effect. Another source of false positives is when a neutral value ··· 6 5 //# same structure as other similar expressions 7 6 /// 8 7 // Confidence: Moderate 9 - // Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 10 - // Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 11 - // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 8 + // Copyright: (C) 2010 Nicolas Palix, DIKU. 9 + // Copyright: (C) 2010 Julia Lawall, DIKU. 10 + // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. 12 11 // URL: http://coccinelle.lip6.fr/ 13 12 // Comments: 14 13 // Options: --no-includes --include-headers
+4 -3
scripts/coccinelle/tests/doubletest.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Find &&/|| operations that include the same argument more than once 2 3 //# A common source of false positives is when the expression, or 3 4 //# another expresssion in the same && or || operation, performs a 4 5 //# side effect. 5 6 /// 6 7 // Confidence: Moderate 7 - // Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. 8 - // Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. 9 - // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. 8 + // Copyright: (C) 2010 Nicolas Palix, DIKU. 9 + // Copyright: (C) 2010 Julia Lawall, DIKU. 10 + // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. 10 11 // URL: http://coccinelle.lip6.fr/ 11 12 // Comments: 12 13 // Options: --no-includes --include-headers
+3 -2
scripts/coccinelle/tests/odd_ptr_err.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// PTR_ERR should access the value just tested by IS_ERR 2 3 //# There can be false positives in the patch case, where it is the call to 3 4 //# IS_ERR that is wrong. 4 5 /// 5 6 // Confidence: High 6 - // Copyright: (C) 2012, 2015 Julia Lawall, INRIA. GPLv2. 7 - // Copyright: (C) 2012, 2015 Gilles Muller, INRIA. GPLv2. 7 + // Copyright: (C) 2012, 2015 Julia Lawall, INRIA. 8 + // Copyright: (C) 2012, 2015 Gilles Muller, INRIA. 8 9 // URL: http://coccinelle.lip6.fr/ 9 10 // Options: --no-includes --include-headers 10 11
+2 -1
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /// Unsigned expressions cannot be lesser than zero. Presence of 2 3 /// comparisons 'unsigned (<|<=|>|>=) 0' often indicates a bug, 3 4 /// usually wrong type of variable. ··· 12 11 /// result is used to avoid false positives difficult to detect by other ways 13 12 /// 14 13 // Confidence: Average 15 - // Copyright: (C) 2015 Andrzej Hajda, Samsung Electronics Co., Ltd. GPLv2. 14 + // Copyright: (C) 2015 Andrzej Hajda, Samsung Electronics Co., Ltd. 16 15 // URL: http://coccinelle.lip6.fr/ 17 16 // Options: --all-includes 18 17
+1 -2
tools/laptop/freefall/freefall.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* Disk protection for HP/DELL machines. 2 3 * 3 4 * Copyright 2008 Eric Piel 4 5 * Copyright 2009 Pavel Machek <pavel@ucw.cz> 5 6 * Copyright 2012 Sonal Santan 6 7 * Copyright 2014 Pali Rohár <pali.rohar@gmail.com> 7 - * 8 - * GPLv2. 9 8 */ 10 9 11 10 #include <stdio.h>