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

Merge tag 'spdx-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx

Pull SPDX updates from Greg KH:
"Here are some SPDX license marker changes.

The SPDX-labeling effort has started to pick up again, so here are
some changes for various parts of the tree that are related to this
effort.

Included in here are:

- freevxfs license updates

- spihash.c license cleanups

- spdxcheck script updates to make things easier to work with going
forward

All of the license updates came from the original authors/copyright
holders of the code involved.

All of these have been in linux-next for weeks with no reported
issues"

* tag 'spdx-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
siphash: add SPDX tags as sole licensing authority
scripts/spdxcheck: Exclude top-level README
scripts/spdxcheck: Exclude MAINTAINERS/CREDITS
scripts/spdxcheck: Exclude config directories
scripts/spdxcheck: Put excluded files and directories into a separate file
scripts/spdxcheck: Add option to display files without SPDX
scripts/spdxcheck: Add [sub]directory statistics
scripts/spdxcheck: Add directory statistics
scripts/spdxcheck: Add percentage to statistics
freevxfs: relicense to GPLv2 only

+202 -378
+1 -26
fs/freevxfs/vxfs.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 4 * Copyright (c) 2016 Krzysztof Blaszkowski 4 - * All rights reserved. 5 - * 6 - * Redistribution and use in source and binary forms, with or without 7 - * modification, are permitted provided that the following conditions 8 - * are met: 9 - * 1. Redistributions of source code must retain the above copyright 10 - * notice, this list of conditions, and the following disclaimer, 11 - * without modification. 12 - * 2. The name of the author may not be used to endorse or promote products 13 - * derived from this software without specific prior written permission. 14 - * 15 - * Alternatively, this software may be distributed under the terms of the 16 - * GNU General Public License ("GPL"). 17 - * 18 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 22 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 - * SUCH DAMAGE. 29 - * 30 5 */ 31 6 #ifndef _VXFS_SUPER_H_ 32 7 #define _VXFS_SUPER_H_
+1 -25
fs/freevxfs/vxfs_bmap.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 - * All rights reserved. 4 - * 5 - * Redistribution and use in source and binary forms, with or without 6 - * modification, are permitted provided that the following conditions 7 - * are met: 8 - * 1. Redistributions of source code must retain the above copyright 9 - * notice, this list of conditions, and the following disclaimer, 10 - * without modification. 11 - * 2. The name of the author may not be used to endorse or promote products 12 - * derived from this software without specific prior written permission. 13 - * 14 - * Alternatively, this software may be distributed under the terms of the 15 - * GNU General Public License ("GPL"). 16 - * 17 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 21 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 - * SUCH DAMAGE. 28 4 */ 29 5 30 6 /*
+1 -26
fs/freevxfs/vxfs_dir.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 - * All rights reserved. 4 - * 5 - * Redistribution and use in source and binary forms, with or without 6 - * modification, are permitted provided that the following conditions 7 - * are met: 8 - * 1. Redistributions of source code must retain the above copyright 9 - * notice, this list of conditions, and the following disclaimer, 10 - * without modification. 11 - * 2. The name of the author may not be used to endorse or promote products 12 - * derived from this software without specific prior written permission. 13 - * 14 - * Alternatively, this software may be distributed under the terms of the 15 - * GNU General Public License ("GPL"). 16 - * 17 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 21 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 - * SUCH DAMAGE. 28 - * 29 4 */ 30 5 #ifndef _VXFS_DIR_H_ 31 6 #define _VXFS_DIR_H_
+1 -26
fs/freevxfs/vxfs_extern.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 - * All rights reserved. 4 - * 5 - * Redistribution and use in source and binary forms, with or without 6 - * modification, are permitted provided that the following conditions 7 - * are met: 8 - * 1. Redistributions of source code must retain the above copyright 9 - * notice, this list of conditions, and the following disclaimer, 10 - * without modification. 11 - * 2. The name of the author may not be used to endorse or promote products 12 - * derived from this software without specific prior written permission. 13 - * 14 - * Alternatively, this software may be distributed under the terms of the 15 - * GNU General Public License ("GPL"). 16 - * 17 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 21 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 - * SUCH DAMAGE. 28 - * 29 4 */ 30 5 #ifndef _VXFS_EXTERN_H_ 31 6 #define _VXFS_EXTERN_H_
+1 -25
fs/freevxfs/vxfs_fshead.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 4 * Copyright (c) 2016 Krzysztof Blaszkowski 4 - * All rights reserved. 5 - * 6 - * Redistribution and use in source and binary forms, with or without 7 - * modification, are permitted provided that the following conditions 8 - * are met: 9 - * 1. Redistributions of source code must retain the above copyright 10 - * notice, this list of conditions, and the following disclaimer, 11 - * without modification. 12 - * 2. The name of the author may not be used to endorse or promote products 13 - * derived from this software without specific prior written permission. 14 - * 15 - * Alternatively, this software may be distributed under the terms of the 16 - * GNU General Public License ("GPL"). 17 - * 18 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 22 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 - * SUCH DAMAGE. 29 5 */ 30 6 31 7 /*
+1 -26
fs/freevxfs/vxfs_fshead.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 4 * Copyright (c) 2016 Krzysztof Blaszkowski 4 - * All rights reserved. 5 - * 6 - * Redistribution and use in source and binary forms, with or without 7 - * modification, are permitted provided that the following conditions 8 - * are met: 9 - * 1. Redistributions of source code must retain the above copyright 10 - * notice, this list of conditions, and the following disclaimer, 11 - * without modification. 12 - * 2. The name of the author may not be used to endorse or promote products 13 - * derived from this software without specific prior written permission. 14 - * 15 - * Alternatively, this software may be distributed under the terms of the 16 - * GNU General Public License ("GPL"). 17 - * 18 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 22 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 - * SUCH DAMAGE. 29 - * 30 5 */ 31 6 #ifndef _VXFS_FSHEAD_H_ 32 7 #define _VXFS_FSHEAD_H_
+1 -25
fs/freevxfs/vxfs_immed.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 - * All rights reserved. 4 - * 5 - * Redistribution and use in source and binary forms, with or without 6 - * modification, are permitted provided that the following conditions 7 - * are met: 8 - * 1. Redistributions of source code must retain the above copyright 9 - * notice, this list of conditions, and the following disclaimer, 10 - * without modification. 11 - * 2. The name of the author may not be used to endorse or promote products 12 - * derived from this software without specific prior written permission. 13 - * 14 - * Alternatively, this software may be distributed under the terms of the 15 - * GNU General Public License ("GPL"). 16 - * 17 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 21 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 - * SUCH DAMAGE. 28 4 */ 29 5 30 6 /*
+1 -25
fs/freevxfs/vxfs_inode.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 4 * Copyright (c) 2016 Krzysztof Blaszkowski 4 - * All rights reserved. 5 - * 6 - * Redistribution and use in source and binary forms, with or without 7 - * modification, are permitted provided that the following conditions 8 - * are met: 9 - * 1. Redistributions of source code must retain the above copyright 10 - * notice, this list of conditions, and the following disclaimer, 11 - * without modification. 12 - * 2. The name of the author may not be used to endorse or promote products 13 - * derived from this software without specific prior written permission. 14 - * 15 - * Alternatively, this software may be distributed under the terms of the 16 - * GNU General Public License ("GPL"). 17 - * 18 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 22 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 - * SUCH DAMAGE. 29 5 */ 30 6 31 7 /*
+1 -26
fs/freevxfs/vxfs_inode.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 4 * Copyright (c) 2016 Krzysztof Blaszkowski 4 - * All rights reserved. 5 - * 6 - * Redistribution and use in source and binary forms, with or without 7 - * modification, are permitted provided that the following conditions 8 - * are met: 9 - * 1. Redistributions of source code must retain the above copyright 10 - * notice, this list of conditions, and the following disclaimer, 11 - * without modification. 12 - * 2. The name of the author may not be used to endorse or promote products 13 - * derived from this software without specific prior written permission. 14 - * 15 - * Alternatively, this software may be distributed under the terms of the 16 - * GNU General Public License ("GPL"). 17 - * 18 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 22 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 - * SUCH DAMAGE. 29 - * 30 5 */ 31 6 #ifndef _VXFS_INODE_H_ 32 7 #define _VXFS_INODE_H_
+1 -25
fs/freevxfs/vxfs_lookup.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 4 * Copyright (c) 2016 Krzysztof Blaszkowski 4 - * All rights reserved. 5 - * 6 - * Redistribution and use in source and binary forms, with or without 7 - * modification, are permitted provided that the following conditions 8 - * are met: 9 - * 1. Redistributions of source code must retain the above copyright 10 - * notice, this list of conditions, and the following disclaimer, 11 - * without modification. 12 - * 2. The name of the author may not be used to endorse or promote products 13 - * derived from this software without specific prior written permission. 14 - * 15 - * Alternatively, this software may be distributed under the terms of the 16 - * GNU General Public License ("GPL"). 17 - * 18 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 22 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 - * SUCH DAMAGE. 29 5 */ 30 6 31 7 /*
+1 -25
fs/freevxfs/vxfs_olt.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 - * All rights reserved. 4 - * 5 - * Redistribution and use in source and binary forms, with or without 6 - * modification, are permitted provided that the following conditions 7 - * are met: 8 - * 1. Redistributions of source code must retain the above copyright 9 - * notice, this list of conditions, and the following disclaimer, 10 - * without modification. 11 - * 2. The name of the author may not be used to endorse or promote products 12 - * derived from this software without specific prior written permission. 13 - * 14 - * Alternatively, this software may be distributed under the terms of the 15 - * GNU General Public License ("GPL"). 16 - * 17 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 21 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 - * SUCH DAMAGE. 28 4 */ 29 5 30 6 /*
+1 -26
fs/freevxfs/vxfs_olt.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 - * All rights reserved. 4 - * 5 - * Redistribution and use in source and binary forms, with or without 6 - * modification, are permitted provided that the following conditions 7 - * are met: 8 - * 1. Redistributions of source code must retain the above copyright 9 - * notice, this list of conditions, and the following disclaimer, 10 - * without modification. 11 - * 2. The name of the author may not be used to endorse or promote products 12 - * derived from this software without specific prior written permission. 13 - * 14 - * Alternatively, this software may be distributed under the terms of the 15 - * GNU General Public License ("GPL"). 16 - * 17 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 21 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 - * SUCH DAMAGE. 28 - * 29 4 */ 30 5 #ifndef _VXFS_OLT_H_ 31 6 #define _VXFS_OLT_H_
+1 -25
fs/freevxfs/vxfs_subr.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 - * All rights reserved. 4 - * 5 - * Redistribution and use in source and binary forms, with or without 6 - * modification, are permitted provided that the following conditions 7 - * are met: 8 - * 1. Redistributions of source code must retain the above copyright 9 - * notice, this list of conditions, and the following disclaimer, 10 - * without modification. 11 - * 2. The name of the author may not be used to endorse or promote products 12 - * derived from this software without specific prior written permission. 13 - * 14 - * Alternatively, this software may be distributed under the terms of the 15 - * GNU General Public License ("GPL"). 16 - * 17 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 21 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 - * SUCH DAMAGE. 28 4 */ 29 5 30 6 /*
+1 -25
fs/freevxfs/vxfs_super.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 2 3 * Copyright (c) 2000-2001 Christoph Hellwig. 3 4 * Copyright (c) 2016 Krzysztof Blaszkowski 4 - * All rights reserved. 5 - * 6 - * Redistribution and use in source and binary forms, with or without 7 - * modification, are permitted provided that the following conditions 8 - * are met: 9 - * 1. Redistributions of source code must retain the above copyright 10 - * notice, this list of conditions, and the following disclaimer, 11 - * without modification. 12 - * 2. The name of the author may not be used to endorse or promote products 13 - * derived from this software without specific prior written permission. 14 - * 15 - * Alternatively, this software may be distributed under the terms of the 16 - * GNU General Public License ("GPL"). 17 - * 18 - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 22 - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 - * SUCH DAMAGE. 29 5 */ 30 6 31 7 /*
+2 -3
include/linux/siphash.h
··· 1 - /* Copyright (C) 2016 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 2 - * 3 - * This file is provided under a dual BSD/GPLv2 license. 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 2 + /* Copyright (C) 2016-2022 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 3 * 5 4 * SipHash: a fast short-input PRF 6 5 * https://131002.net/siphash/
+2 -3
lib/siphash.c
··· 1 - /* Copyright (C) 2016 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 2 - * 3 - * This file is provided under a dual BSD/GPLv2 license. 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 + /* Copyright (C) 2016-2022 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 3 * 5 4 * SipHash: a fast short-input PRF 6 5 * https://131002.net/siphash/
+3 -4
lib/test_siphash.c
··· 1 - /* Test cases for siphash.c 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 + /* Copyright (C) 2016-2022 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 2 3 * 3 - * Copyright (C) 2016 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 - * 5 - * This file is provided under a dual BSD/GPLv2 license. 4 + * Test cases for siphash.c 6 5 * 7 6 * SipHash: a fast short-input PRF 8 7 * https://131002.net/siphash/
+163 -12
scripts/spdxcheck.py
··· 6 6 from ply import lex, yacc 7 7 import locale 8 8 import traceback 9 + import fnmatch 9 10 import sys 10 11 import git 11 12 import re ··· 28 27 self.exception_files = 0 29 28 self.licenses = [ ] 30 29 self.exceptions = { } 30 + 31 + class dirinfo(object): 32 + def __init__(self): 33 + self.missing = 0 34 + self.total = 0 35 + self.files = [] 36 + 37 + def update(self, fname, basedir, miss): 38 + self.total += 1 39 + self.missing += miss 40 + if miss: 41 + fname = './' + fname 42 + bdir = os.path.dirname(fname) 43 + if bdir == basedir.rstrip('/'): 44 + self.files.append(fname) 31 45 32 46 # Read the spdx data from the LICENSES directory 33 47 def read_spdxdata(repo): ··· 107 91 self.parser = yacc.yacc(module = self, write_tables = False, debug = False) 108 92 self.lines_checked = 0 109 93 self.checked = 0 94 + self.excluded = 0 110 95 self.spdx_valid = 0 111 96 self.spdx_errors = 0 97 + self.spdx_dirs = {} 98 + self.dirdepth = -1 99 + self.basedir = '.' 112 100 self.curline = 0 113 101 self.deepest = 0 102 + 103 + def set_dirinfo(self, basedir, dirdepth): 104 + if dirdepth >= 0: 105 + self.basedir = basedir 106 + bdir = basedir.lstrip('./').rstrip('/') 107 + if bdir != '': 108 + parts = bdir.split('/') 109 + else: 110 + parts = [] 111 + self.dirdepth = dirdepth + len(parts) 114 112 115 113 # Validate License and Exception IDs 116 114 def validate(self, tok): ··· 197 167 def parse_lines(self, fd, maxlines, fname): 198 168 self.checked += 1 199 169 self.curline = 0 170 + fail = 1 200 171 try: 201 172 for line in fd: 202 173 line = line.decode(locale.getpreferredencoding(False), errors='ignore') ··· 223 192 # Should we check for more SPDX ids in the same file and 224 193 # complain if there are any? 225 194 # 195 + fail = 0 226 196 break 227 197 228 198 except ParserException as pe: ··· 235 203 sys.stdout.write('%s: %d:0 %s\n' %(fname, self.curline, pe.txt)) 236 204 self.spdx_errors += 1 237 205 238 - def scan_git_tree(tree): 206 + if fname == '-': 207 + return 208 + 209 + base = os.path.dirname(fname) 210 + if self.dirdepth > 0: 211 + parts = base.split('/') 212 + i = 0 213 + base = '.' 214 + while i < self.dirdepth and i < len(parts) and len(parts[i]): 215 + base += '/' + parts[i] 216 + i += 1 217 + elif self.dirdepth == 0: 218 + base = self.basedir 219 + else: 220 + base = './' + base.rstrip('/') 221 + base += '/' 222 + 223 + di = self.spdx_dirs.get(base, dirinfo()) 224 + di.update(fname, base, fail) 225 + self.spdx_dirs[base] = di 226 + 227 + class pattern(object): 228 + def __init__(self, line): 229 + self.pattern = line 230 + self.match = self.match_file 231 + if line == '.*': 232 + self.match = self.match_dot 233 + elif line.endswith('/'): 234 + self.pattern = line[:-1] 235 + self.match = self.match_dir 236 + elif line.startswith('/'): 237 + self.pattern = line[1:] 238 + self.match = self.match_fn 239 + 240 + def match_dot(self, fpath): 241 + return os.path.basename(fpath).startswith('.') 242 + 243 + def match_file(self, fpath): 244 + return os.path.basename(fpath) == self.pattern 245 + 246 + def match_fn(self, fpath): 247 + return fnmatch.fnmatchcase(fpath, self.pattern) 248 + 249 + def match_dir(self, fpath): 250 + if self.match_fn(os.path.dirname(fpath)): 251 + return True 252 + return fpath.startswith(self.pattern) 253 + 254 + def exclude_file(fpath): 255 + for rule in exclude_rules: 256 + if rule.match(fpath): 257 + return True 258 + return False 259 + 260 + def scan_git_tree(tree, basedir, dirdepth): 261 + parser.set_dirinfo(basedir, dirdepth) 239 262 for el in tree.traverse(): 240 - # Exclude stuff which would make pointless noise 241 - # FIXME: Put this somewhere more sensible 242 - if el.path.startswith("LICENSES"): 243 - continue 244 - if el.path.find("license-rules.rst") >= 0: 245 - continue 246 263 if not os.path.isfile(el.path): 264 + continue 265 + if exclude_file(el.path): 266 + parser.excluded += 1 247 267 continue 248 268 with open(el.path, 'rb') as fd: 249 269 parser.parse_lines(fd, args.maxlines, el.path) 250 270 251 - def scan_git_subtree(tree, path): 271 + def scan_git_subtree(tree, path, dirdepth): 252 272 for p in path.strip('/').split('/'): 253 273 tree = tree[p] 254 - scan_git_tree(tree) 274 + scan_git_tree(tree, path.strip('/'), dirdepth) 275 + 276 + def read_exclude_file(fname): 277 + rules = [] 278 + if not fname: 279 + return rules 280 + with open(fname) as fd: 281 + for line in fd: 282 + line = line.strip() 283 + if line.startswith('#'): 284 + continue 285 + if not len(line): 286 + continue 287 + rules.append(pattern(line)) 288 + return rules 255 289 256 290 if __name__ == '__main__': 257 291 258 292 ap = ArgumentParser(description='SPDX expression checker') 259 293 ap.add_argument('path', nargs='*', help='Check path or file. If not given full git tree scan. For stdin use "-"') 294 + ap.add_argument('-d', '--dirs', action='store_true', 295 + help='Show [sub]directory statistics.') 296 + ap.add_argument('-D', '--depth', type=int, default=-1, 297 + help='Directory depth for -d statistics. Default: unlimited') 298 + ap.add_argument('-e', '--exclude', 299 + help='File containing file patterns to exclude. Default: scripts/spdxexclude') 300 + ap.add_argument('-f', '--files', action='store_true', 301 + help='Show files without SPDX.') 260 302 ap.add_argument('-m', '--maxlines', type=int, default=15, 261 303 help='Maximum number of lines to scan in a file. Default 15') 262 304 ap.add_argument('-v', '--verbose', action='store_true', help='Verbose statistics output') ··· 365 259 sys.exit(1) 366 260 367 261 try: 262 + fname = args.exclude 263 + if not fname: 264 + fname = os.path.join(os.path.dirname(__file__), 'spdxexclude') 265 + exclude_rules = read_exclude_file(fname) 266 + except Exception as ex: 267 + sys.stderr.write('FAIL: Reading exclude file %s: %s\n' %(fname, ex)) 268 + sys.exit(1) 269 + 270 + try: 368 271 if len(args.path) and args.path[0] == '-': 369 272 stdin = os.fdopen(sys.stdin.fileno(), 'rb') 370 273 parser.parse_lines(stdin, args.maxlines, '-') ··· 383 268 if os.path.isfile(p): 384 269 parser.parse_lines(open(p, 'rb'), args.maxlines, p) 385 270 elif os.path.isdir(p): 386 - scan_git_subtree(repo.head.reference.commit.tree, p) 271 + scan_git_subtree(repo.head.reference.commit.tree, p, 272 + args.depth) 387 273 else: 388 274 sys.stderr.write('path %s does not exist\n' %p) 389 275 sys.exit(1) 390 276 else: 391 277 # Full git tree scan 392 - scan_git_tree(repo.head.commit.tree) 278 + scan_git_tree(repo.head.commit.tree, '.', args.depth) 279 + 280 + ndirs = len(parser.spdx_dirs) 281 + dirsok = 0 282 + if ndirs: 283 + for di in parser.spdx_dirs.values(): 284 + if not di.missing: 285 + dirsok += 1 393 286 394 287 if args.verbose: 395 288 sys.stderr.write('\n') ··· 406 283 sys.stderr.write('License IDs %12d\n' %len(spdx.licenses)) 407 284 sys.stderr.write('Exception IDs %12d\n' %len(spdx.exceptions)) 408 285 sys.stderr.write('\n') 286 + sys.stderr.write('Files excluded: %12d\n' %parser.excluded) 409 287 sys.stderr.write('Files checked: %12d\n' %parser.checked) 410 288 sys.stderr.write('Lines checked: %12d\n' %parser.lines_checked) 411 - sys.stderr.write('Files with SPDX: %12d\n' %parser.spdx_valid) 289 + if parser.checked: 290 + pc = int(100 * parser.spdx_valid / parser.checked) 291 + sys.stderr.write('Files with SPDX: %12d %3d%%\n' %(parser.spdx_valid, pc)) 412 292 sys.stderr.write('Files with errors: %12d\n' %parser.spdx_errors) 293 + if ndirs: 294 + sys.stderr.write('\n') 295 + sys.stderr.write('Directories accounted: %8d\n' %ndirs) 296 + pc = int(100 * dirsok / ndirs) 297 + sys.stderr.write('Directories complete: %8d %3d%%\n' %(dirsok, pc)) 298 + 299 + if ndirs and ndirs != dirsok and args.dirs: 300 + if args.verbose: 301 + sys.stderr.write('\n') 302 + sys.stderr.write('Incomplete directories: SPDX in Files\n') 303 + for f in sorted(parser.spdx_dirs.keys()): 304 + di = parser.spdx_dirs[f] 305 + if di.missing: 306 + valid = di.total - di.missing 307 + pc = int(100 * valid / di.total) 308 + sys.stderr.write(' %-80s: %5d of %5d %3d%%\n' %(f, valid, di.total, pc)) 309 + 310 + if ndirs and ndirs != dirsok and args.files: 311 + if args.verbose or args.dirs: 312 + sys.stderr.write('\n') 313 + sys.stderr.write('Files without SPDX:\n') 314 + for f in sorted(parser.spdx_dirs.keys()): 315 + di = parser.spdx_dirs[f] 316 + for f in sorted(di.files): 317 + sys.stderr.write(' %s\n' %f) 413 318 414 319 sys.exit(0) 415 320
+18
scripts/spdxexclude
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + # 3 + # Patterns for excluding files and directories 4 + 5 + # Ignore the license directory and the licensing documentation which would 6 + # create lots of noise for no value 7 + LICENSES/ 8 + license-rules.rst 9 + 10 + # Ignore config files and snippets. The majority is generated 11 + # by the Kconfig tools 12 + kernel/configs/ 13 + arch/*/configs/ 14 + 15 + # Other files without copyrightable content 16 + /CREDITS 17 + /MAINTAINERS 18 + /README