summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-05-06 17:58:06 -0400
committerTom Rini <trini@konsulko.com>2018-05-07 09:34:12 -0400
commit83d290c56fab2d38cd1ab4c4cc7099559c1d5046 (patch)
tree5e5d1b40b52aaf96b707e0da2474573306d22f7b /lib
parent7ce85318cfff5fd82a059131761559cba7fef309 (diff)
SPDX: Convert all of our single license tags to Linux Kernel style
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile4
-rw-r--r--lib/addr_map.c3
-rw-r--r--lib/aes.c3
-rw-r--r--lib/asm-offsets.c3
-rw-r--r--lib/at91/Makefile4
-rw-r--r--lib/at91/at91.c3
-rw-r--r--lib/at91/atmel_logo_8bpp.h3
-rw-r--r--lib/at91/microchip_logo_8bpp.h3
-rw-r--r--lib/bch.c3
-rw-r--r--lib/bitrev.c2
-rw-r--r--lib/bzip2/Makefile4
-rw-r--r--lib/circbuf.c3
-rw-r--r--lib/crc16.c3
-rw-r--r--lib/crc32c.c2
-rw-r--r--lib/crc8.c3
-rw-r--r--lib/ctype.c3
-rw-r--r--lib/dhry/Makefile4
-rw-r--r--lib/dhry/cmd_dhry.c3
-rw-r--r--lib/dhry/dhry.h3
-rw-r--r--lib/dhry/dhry_1.c3
-rw-r--r--lib/dhry/dhry_2.c3
-rw-r--r--lib/display_options.c3
-rw-r--r--lib/efi/Makefile4
-rw-r--r--lib/efi/efi.c3
-rw-r--r--lib/efi/efi_app.c3
-rw-r--r--lib/efi/efi_info.c3
-rw-r--r--lib/efi/efi_stub.c3
-rw-r--r--lib/efi_loader/efi_device_path.c3
-rw-r--r--lib/efi_loader/helloworld.c3
-rw-r--r--lib/efi_selftest/efi_selftest.c3
-rw-r--r--lib/efi_selftest/efi_selftest_bitblt.c3
-rw-r--r--lib/efi_selftest/efi_selftest_block_device.c3
-rw-r--r--lib/efi_selftest/efi_selftest_console.c3
-rw-r--r--lib/efi_selftest/efi_selftest_controllers.c3
-rw-r--r--lib/efi_selftest/efi_selftest_devicepath.c3
-rw-r--r--lib/efi_selftest/efi_selftest_devicepath_util.c3
-rw-r--r--lib/efi_selftest/efi_selftest_event_groups.c3
-rw-r--r--lib/efi_selftest/efi_selftest_events.c3
-rw-r--r--lib/efi_selftest/efi_selftest_exitbootservices.c3
-rw-r--r--lib/efi_selftest/efi_selftest_fdt.c3
-rw-r--r--lib/efi_selftest/efi_selftest_gop.c3
-rw-r--r--lib/efi_selftest/efi_selftest_manageprotocols.c3
-rw-r--r--lib/efi_selftest/efi_selftest_miniapp_exit.c3
-rw-r--r--lib/efi_selftest/efi_selftest_miniapp_return.c3
-rw-r--r--lib/efi_selftest/efi_selftest_snp.c3
-rw-r--r--lib/efi_selftest/efi_selftest_startimage_exit.c3
-rw-r--r--lib/efi_selftest/efi_selftest_startimage_return.c3
-rw-r--r--lib/efi_selftest/efi_selftest_textinput.c3
-rw-r--r--lib/efi_selftest/efi_selftest_textoutput.c3
-rw-r--r--lib/efi_selftest/efi_selftest_tpl.c3
-rw-r--r--lib/efi_selftest/efi_selftest_util.c3
-rw-r--r--lib/efi_selftest/efi_selftest_watchdog.c3
-rw-r--r--lib/fdtdec.c2
-rw-r--r--lib/fdtdec_common.c3
-rw-r--r--lib/fdtdec_test.c2
-rw-r--r--lib/gunzip.c3
-rw-r--r--lib/gzip.c3
-rw-r--r--lib/hang.c3
-rw-r--r--lib/hashtable.c3
-rw-r--r--lib/initcall.c3
-rw-r--r--lib/ldiv.c3
-rw-r--r--lib/libfdt/Makefile4
-rw-r--r--lib/lmb.c3
-rw-r--r--lib/lzma/LzmaTools.c3
-rw-r--r--lib/lzma/LzmaTools.h3
-rw-r--r--lib/lzma/Makefile4
-rw-r--r--lib/lzo/Makefile4
-rw-r--r--lib/membuff.c3
-rw-r--r--lib/net_utils.c3
-rw-r--r--lib/of_live.c3
-rw-r--r--lib/optee/Makefile4
-rw-r--r--lib/optee/optee.c3
-rw-r--r--lib/rand.c3
-rw-r--r--lib/rbtree.c3
-rw-r--r--lib/rc4.c3
-rw-r--r--lib/rsa/Makefile4
-rw-r--r--lib/rsa/rsa-checksum.c3
-rw-r--r--lib/rsa/rsa-mod-exp.c3
-rw-r--r--lib/rsa/rsa-sign.c3
-rw-r--r--lib/rsa/rsa-verify.c3
-rw-r--r--lib/sha1.c3
-rw-r--r--lib/sha256.c3
-rw-r--r--lib/smbios.c3
-rw-r--r--lib/strmhz.c3
-rw-r--r--lib/tables_csum.c3
-rw-r--r--lib/time.c3
-rw-r--r--lib/tiny-printf.c3
-rw-r--r--lib/tizen/Makefile4
-rw-r--r--lib/tizen/tizen.c3
-rw-r--r--lib/tizen/tizen_logo_16bpp.h5
-rw-r--r--lib/tizen/tizen_logo_16bpp_gzip.h5
-rw-r--r--lib/tpm.c3
-rw-r--r--lib/trace.c3
-rw-r--r--lib/uuid.c3
-rw-r--r--lib/zlib/Makefile4
95 files changed, 97 insertions, 200 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 13be8f4cfc..d531ea54b3 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1,9 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2000-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
ifndef CONFIG_SPL_BUILD
diff --git a/lib/addr_map.c b/lib/addr_map.c
index 403640b95f..09771f3a5a 100644
--- a/lib/addr_map.c
+++ b/lib/addr_map.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2008 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier: GPL-2.0
*/
#include <common.h>
diff --git a/lib/aes.c b/lib/aes.c
index 2b0849c7e0..a12a192084 100644
--- a/lib/aes.c
+++ b/lib/aes.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2011 The Chromium OS Authors.
* (C) Copyright 2011 NVIDIA Corporation www.nvidia.com
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index f4f1bb8ffd..26175132f3 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c
*
@@ -8,8 +9,6 @@
* generate asm statements containing #defines,
* compile this file to assembler, and then extract the
* #defines from the assembly-language output.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/at91/Makefile b/lib/at91/Makefile
index 5a18875382..f8d0b9d4d8 100644
--- a/lib/at91/Makefile
+++ b/lib/at91/Makefile
@@ -1,8 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (C) 2017 Microchip
# Wenyou.Yang <wenyou.yang@microchip.com>
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
obj-$(CONFIG_ARCH_AT91) += at91.o
diff --git a/lib/at91/at91.c b/lib/at91/at91.c
index 5dca1507da..048597690b 100644
--- a/lib/at91/at91.c
+++ b/lib/at91/at91.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2016 Microchip
* Wenyou.Yang <wenyou.yang@microchip.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/at91/atmel_logo_8bpp.h b/lib/at91/atmel_logo_8bpp.h
index bd5dc7a68a..dff5047f09 100644
--- a/lib/at91/atmel_logo_8bpp.h
+++ b/lib/at91/atmel_logo_8bpp.h
@@ -1,8 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2017 Microchip
* Wenyou.Yang <wenyou.yang@microchip.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __ATMEL_LOGO_8BPP_H__
diff --git a/lib/at91/microchip_logo_8bpp.h b/lib/at91/microchip_logo_8bpp.h
index b7213b12b4..a56f1607cb 100644
--- a/lib/at91/microchip_logo_8bpp.h
+++ b/lib/at91/microchip_logo_8bpp.h
@@ -1,8 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2017 Microchip
* Wenyou.Yang <wenyou.yang@microchip.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __MICROCHIP_LOGO_8BPP_H__
diff --git a/lib/bch.c b/lib/bch.c
index d0d7e25c4e..20079eb9eb 100644
--- a/lib/bch.c
+++ b/lib/bch.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Generic binary BCH encoding/decoding library
*
- * SPDX-License-Identifier: GPL-2.0
- *
* Copyright © 2011 Parrot S.A.
*
* Author: Ivan Djelic <ivan.djelic@parrot.com>
diff --git a/lib/bitrev.c b/lib/bitrev.c
index 72cb39b051..4d494e1733 100644
--- a/lib/bitrev.c
+++ b/lib/bitrev.c
@@ -1,5 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * SPDX-License-Identifier: GPL-2.0+
*
* Based on bitrev from the Linux kernel, by Akinobu Mita
*/
diff --git a/lib/bzip2/Makefile b/lib/bzip2/Makefile
index 585d776ba8..ebdd2976de 100644
--- a/lib/bzip2/Makefile
+++ b/lib/bzip2/Makefile
@@ -1,6 +1,4 @@
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
+# SPDX-License-Identifier: GPL-2.0+
obj-y += bzlib.o bzlib_crctable.o bzlib_decompress.o \
bzlib_randtable.o bzlib_huffman.o
diff --git a/lib/circbuf.c b/lib/circbuf.c
index 6ed0516430..071e4fb8a6 100644
--- a/lib/circbuf.c
+++ b/lib/circbuf.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2003
* Gerry Hamel, geh@ti.com, Texas Instruments
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/crc16.c b/lib/crc16.c
index 753b987b02..763ae33f34 100644
--- a/lib/crc16.c
+++ b/lib/crc16.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: eCos-2.0
/*
*==========================================================================
*
@@ -6,8 +7,6 @@
* 16 bit CRC with polynomial x^16+x^12+x^5+1
*
*==========================================================================
- * SPDX-License-Identifier: eCos-2.0
- *==========================================================================
*#####DESCRIPTIONBEGIN####
*
* Author(s): gthomas
diff --git a/lib/crc32c.c b/lib/crc32c.c
index 322c08ff5d..016b34a523 100644
--- a/lib/crc32c.c
+++ b/lib/crc32c.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copied from Linux kernel crypto/crc32c.c
* Copyright (c) 2004 Cisco Systems, Inc.
@@ -7,7 +8,6 @@
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/crc8.c b/lib/crc8.c
index 51d540fbcb..55f7c07285 100644
--- a/lib/crc8.c
+++ b/lib/crc8.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013 Google, Inc
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include "linux/crc8.h"
diff --git a/lib/ctype.c b/lib/ctype.c
index 65e1ac9ca7..1892e2022b 100644
--- a/lib/ctype.c
+++ b/lib/ctype.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
diff --git a/lib/dhry/Makefile b/lib/dhry/Makefile
index 926c0d6192..10dd9eba0d 100644
--- a/lib/dhry/Makefile
+++ b/lib/dhry/Makefile
@@ -1,7 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (c) 2015 Google, Inc
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
obj-y += cmd_dhry.o dhry_1.o dhry_2.o
diff --git a/lib/dhry/cmd_dhry.c b/lib/dhry/cmd_dhry.c
index f44305bfcf..29504833ef 100644
--- a/lib/dhry/cmd_dhry.c
+++ b/lib/dhry/cmd_dhry.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2015 Google, Inc
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/dhry/dhry.h b/lib/dhry/dhry.h
index 49d4223956..892c9ed73b 100644
--- a/lib/dhry/dhry.h
+++ b/lib/dhry/dhry.h
@@ -1,8 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2015 Google, Inc
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Dhrystone is widely available in the public domain. A GPL license is
* chosen for U-Boot.
*/
diff --git a/lib/dhry/dhry_1.c b/lib/dhry/dhry_1.c
index be6371053f..dcc224fb38 100644
--- a/lib/dhry/dhry_1.c
+++ b/lib/dhry/dhry_1.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2015 Google, Inc
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Dhrystone is widely available in the public domain. A GPL license is
* chosen for U-Boot.
*/
diff --git a/lib/dhry/dhry_2.c b/lib/dhry/dhry_2.c
index 59aa458a34..1ba879673e 100644
--- a/lib/dhry/dhry_2.c
+++ b/lib/dhry/dhry_2.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2015 Google, Inc
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Dhrystone is widely available in the public domain. A GPL license is
* chosen for U-Boot.
*/
diff --git a/lib/display_options.c b/lib/display_options.c
index 4ea27ca99d..f1c930463e 100644
--- a/lib/display_options.c
+++ b/lib/display_options.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2000-2002
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/efi/Makefile b/lib/efi/Makefile
index 9449600b5b..18d081ac46 100644
--- a/lib/efi/Makefile
+++ b/lib/efi/Makefile
@@ -1,8 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2015 Google, Inc
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
obj-$(CONFIG_EFI_APP) += efi_app.o efi.o
obj-$(CONFIG_EFI_STUB) += efi_info.o
diff --git a/lib/efi/efi.c b/lib/efi/efi.c
index b1c7360ddc..c6639f96cc 100644
--- a/lib/efi/efi.c
+++ b/lib/efi/efi.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2015 Google, Inc
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* EFI information obtained here:
* http://wiki.phoenix.com/wiki/index.php/EFI_BOOT_SERVICES
*
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
index f1afd9c8a5..c8280935c8 100644
--- a/lib/efi/efi_app.c
+++ b/lib/efi/efi_app.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2015 Google, Inc
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* EFI information obtained here:
* http://wiki.phoenix.com/wiki/index.php/EFI_BOOT_SERVICES
*
diff --git a/lib/efi/efi_info.c b/lib/efi/efi_info.c
index 0cd9a7e9c7..35a8a9325f 100644
--- a/lib/efi/efi_info.c
+++ b/lib/efi/efi_info.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2015 Google, Inc
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Access to the EFI information table
*/
diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c
index acf60beb4e..3138739ee5 100644
--- a/lib/efi/efi_stub.c
+++ b/lib/efi/efi_stub.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2015 Google, Inc
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* EFI information obtained here:
* http://wiki.phoenix.com/wiki/index.php/EFI_BOOT_SERVICES
*
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 634dacf41b..6040bcff19 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* EFI device path from u-boot device-model mapping
*
* (C) Copyright 2017 Rob Clark
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#define LOG_CATEGORY LOGL_ERR
diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c
index 6c539ba204..046b46a2c1 100644
--- a/lib/efi_loader/helloworld.c
+++ b/lib/efi_loader/helloworld.c
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* EFI hello world
*
* Copyright (c) 2016 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This program demonstrates calling a boottime service.
* It writes a greeting and the load options to the console.
*/
diff --git a/lib/efi_selftest/efi_selftest.c b/lib/efi_selftest/efi_selftest.c
index fd4fee726f..13eb2cd604 100644
--- a/lib/efi_selftest/efi_selftest.c
+++ b/lib/efi_selftest/efi_selftest.c
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* EFI efi_selftest
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <efi_selftest.h>
diff --git a/lib/efi_selftest/efi_selftest_bitblt.c b/lib/efi_selftest/efi_selftest_bitblt.c
index 0fb76cc727..9033109807 100644
--- a/lib/efi_selftest/efi_selftest_bitblt.c
+++ b/lib/efi_selftest/efi_selftest_bitblt.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_bitblt
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Test the block image transfer in the graphical output protocol.
* An animated submarine is shown.
*/
diff --git a/lib/efi_selftest/efi_selftest_block_device.c b/lib/efi_selftest/efi_selftest_block_device.c
index a8979ed56b..4af8bd8cb2 100644
--- a/lib/efi_selftest/efi_selftest_block_device.c
+++ b/lib/efi_selftest/efi_selftest_block_device.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_block
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This test checks the driver for block IO devices.
* A disk image is created in memory.
* A handle is created for the new block IO device.
diff --git a/lib/efi_selftest/efi_selftest_console.c b/lib/efi_selftest/efi_selftest_console.c
index e1649f48bc..c3655a1fcc 100644
--- a/lib/efi_selftest/efi_selftest_console.c
+++ b/lib/efi_selftest/efi_selftest_console.c
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* EFI efi_selftest
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <efi_selftest.h>
diff --git a/lib/efi_selftest/efi_selftest_controllers.c b/lib/efi_selftest/efi_selftest_controllers.c
index 1a22aba6f4..e30c11b1e4 100644
--- a/lib/efi_selftest/efi_selftest_controllers.c
+++ b/lib/efi_selftest/efi_selftest_controllers.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_controllers
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This unit test checks the following protocol services:
* ConnectController, DisconnectController,
* InstallProtocol, UninstallProtocol,
diff --git a/lib/efi_selftest/efi_selftest_devicepath.c b/lib/efi_selftest/efi_selftest_devicepath.c
index da68102eb2..adcf531e90 100644
--- a/lib/efi_selftest/efi_selftest_devicepath.c
+++ b/lib/efi_selftest/efi_selftest_devicepath.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_devicepath
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This unit test checks the following protocol services:
* DevicePathToText
*/
diff --git a/lib/efi_selftest/efi_selftest_devicepath_util.c b/lib/efi_selftest/efi_selftest_devicepath_util.c
index 2b5384f21b..5fef5cfccd 100644
--- a/lib/efi_selftest/efi_selftest_devicepath_util.c
+++ b/lib/efi_selftest/efi_selftest_devicepath_util.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_devicepath_util
*
* Copyright (c) 2018 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This unit test checks the device path utilities protocol.
*/
diff --git a/lib/efi_selftest/efi_selftest_event_groups.c b/lib/efi_selftest/efi_selftest_event_groups.c
index 79e4ea1ce2..9b3c5132ef 100644
--- a/lib/efi_selftest/efi_selftest_event_groups.c
+++ b/lib/efi_selftest/efi_selftest_event_groups.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_event_groups
*
* Copyright (c) 2018 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This test checks the notification of group events and the
* following services:
* CreateEventEx, CloseEvent, SignalEvent, CheckEvent.
diff --git a/lib/efi_selftest/efi_selftest_events.c b/lib/efi_selftest/efi_selftest_events.c
index 5393e39352..47f9f99318 100644
--- a/lib/efi_selftest/efi_selftest_events.c
+++ b/lib/efi_selftest/efi_selftest_events.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_events
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This unit test uses timer events to check the implementation
* of the following boottime services:
* CreateEvent, CloseEvent, WaitForEvent, CheckEvent, SetTimer.
diff --git a/lib/efi_selftest/efi_selftest_exitbootservices.c b/lib/efi_selftest/efi_selftest_exitbootservices.c
index cddd11d52b..f1a136044d 100644
--- a/lib/efi_selftest/efi_selftest_exitbootservices.c
+++ b/lib/efi_selftest/efi_selftest_exitbootservices.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_exitbootservices
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This unit test checks that the notification function of an
* EVT_SIGNAL_EXIT_BOOT_SERVICES event is called exactly once.
*/
diff --git a/lib/efi_selftest/efi_selftest_fdt.c b/lib/efi_selftest/efi_selftest_fdt.c
index e5a8d6a6ae..c7bc242b5c 100644
--- a/lib/efi_selftest/efi_selftest_fdt.c
+++ b/lib/efi_selftest/efi_selftest_fdt.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_pos
*
* Copyright (c) 2018 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Test the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.
*
* The following services are tested:
diff --git a/lib/efi_selftest/efi_selftest_gop.c b/lib/efi_selftest/efi_selftest_gop.c
index 2a0553b115..5b0e2a9605 100644
--- a/lib/efi_selftest/efi_selftest_gop.c
+++ b/lib/efi_selftest/efi_selftest_gop.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_gop
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Test the graphical output protocol.
*/
diff --git a/lib/efi_selftest/efi_selftest_manageprotocols.c b/lib/efi_selftest/efi_selftest_manageprotocols.c
index 874f86102d..3e4755c25e 100644
--- a/lib/efi_selftest/efi_selftest_manageprotocols.c
+++ b/lib/efi_selftest/efi_selftest_manageprotocols.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_manageprotocols
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This unit test checks the following protocol services:
* InstallProtocolInterface, UninstallProtocolInterface,
* InstallMultipleProtocolsInterfaces, UninstallMultipleProtocolsInterfaces,
diff --git a/lib/efi_selftest/efi_selftest_miniapp_exit.c b/lib/efi_selftest/efi_selftest_miniapp_exit.c
index 5ec57aba02..2ffdd65b75 100644
--- a/lib/efi_selftest/efi_selftest_miniapp_exit.c
+++ b/lib/efi_selftest/efi_selftest_miniapp_exit.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_miniapp_exit
*
* Copyright (c) 2018 Heinrich Schuchardt
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This EFI application is run by the StartImage selftest.
* It uses the Exit boot service to return.
*/
diff --git a/lib/efi_selftest/efi_selftest_miniapp_return.c b/lib/efi_selftest/efi_selftest_miniapp_return.c
index 0a82391df6..5709e39cac 100644
--- a/lib/efi_selftest/efi_selftest_miniapp_return.c
+++ b/lib/efi_selftest/efi_selftest_miniapp_return.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_miniapp_return
*
* Copyright (c) 2018 Heinrich Schuchardt
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This EFI application is run by the StartImage selftest.
* It returns directly without calling the Exit boot service.
*/
diff --git a/lib/efi_selftest/efi_selftest_snp.c b/lib/efi_selftest/efi_selftest_snp.c
index cc0705fb59..09bd53da82 100644
--- a/lib/efi_selftest/efi_selftest_snp.c
+++ b/lib/efi_selftest/efi_selftest_snp.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_snp
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This unit test covers the Simple Network Protocol as well as
* the CopyMem and SetMem boottime services.
*
diff --git a/lib/efi_selftest/efi_selftest_startimage_exit.c b/lib/efi_selftest/efi_selftest_startimage_exit.c
index 0809690e97..0d9e16437a 100644
--- a/lib/efi_selftest/efi_selftest_startimage_exit.c
+++ b/lib/efi_selftest/efi_selftest_startimage_exit.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_start_image
*
* Copyright (c) 2018 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This test checks the StartImage boot service.
* The efi_selftest_miniapp_exit.efi application is loaded into memory
* and started.
diff --git a/lib/efi_selftest/efi_selftest_startimage_return.c b/lib/efi_selftest/efi_selftest_startimage_return.c
index 2209911457..3c6249fdf1 100644
--- a/lib/efi_selftest/efi_selftest_startimage_return.c
+++ b/lib/efi_selftest/efi_selftest_startimage_return.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_start_image
*
* Copyright (c) 2018 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This test checks the StartImage boot service.
* The efi_selftest_miniapp_return.efi application is loaded into memory
* and started.
diff --git a/lib/efi_selftest/efi_selftest_textinput.c b/lib/efi_selftest/efi_selftest_textinput.c
index c890ff88b7..7aa84de89d 100644
--- a/lib/efi_selftest/efi_selftest_textinput.c
+++ b/lib/efi_selftest/efi_selftest_textinput.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_textinput
*
* Copyright (c) 2018 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Provides a unit test for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL.
* The unicode character and the scan code are printed for text
* input. To run the test:
diff --git a/lib/efi_selftest/efi_selftest_textoutput.c b/lib/efi_selftest/efi_selftest_textoutput.c
index 6e8c90cc8b..3533647fd4 100644
--- a/lib/efi_selftest/efi_selftest_textoutput.c
+++ b/lib/efi_selftest/efi_selftest_textoutput.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_textoutput
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Test the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.
*
* The following services are tested:
diff --git a/lib/efi_selftest/efi_selftest_tpl.c b/lib/efi_selftest/efi_selftest_tpl.c
index 8243fae15b..61ae46b797 100644
--- a/lib/efi_selftest/efi_selftest_tpl.c
+++ b/lib/efi_selftest/efi_selftest_tpl.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_events
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This unit test uses timer events to check the handling of
* task priority levels.
*/
diff --git a/lib/efi_selftest/efi_selftest_util.c b/lib/efi_selftest/efi_selftest_util.c
index 1b17bf4d4b..87a04f898a 100644
--- a/lib/efi_selftest/efi_selftest_util.c
+++ b/lib/efi_selftest/efi_selftest_util.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_util
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Utility functions
*/
diff --git a/lib/efi_selftest/efi_selftest_watchdog.c b/lib/efi_selftest/efi_selftest_watchdog.c
index e4af38407f..bff2330918 100644
--- a/lib/efi_selftest/efi_selftest_watchdog.c
+++ b/lib/efi_selftest/efi_selftest_watchdog.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_watchdog
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* The 'watchdog timer' unit test checks that the watchdog timer
* will not cause a system restart during the timeout period after
* a timer reset.
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 320ee1dc56..7ef6530870 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1,6 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2011 The Chromium OS Authors.
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef USE_HOSTCC
diff --git a/lib/fdtdec_common.c b/lib/fdtdec_common.c
index 2d083418e0..088e9e9063 100644
--- a/lib/fdtdec_common.c
+++ b/lib/fdtdec_common.c
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2014
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
*
* Based on lib/fdtdec.c:
* Copyright (c) 2011 The Chromium OS Authors.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef USE_HOSTCC
diff --git a/lib/fdtdec_test.c b/lib/fdtdec_test.c
index c51ffd7ecf..a82e27de94 100644
--- a/lib/fdtdec_test.c
+++ b/lib/fdtdec_test.c
@@ -1,9 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Some very basic tests for fdtdec, accessed through test_fdtdec command.
* They are easiest to use with sandbox.
*
* Copyright (c) 2011 The Chromium OS Authors.
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/gunzip.c b/lib/gunzip.c
index adb86c7550..15c7b2c932 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2000-2006
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/gzip.c b/lib/gzip.c
index 2c49e4e9ff..674d732fe6 100644
--- a/lib/gzip.c
+++ b/lib/gzip.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2012
* Lei Wen <leiwen@marvell.com>, Marvell Inc.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/hang.c b/lib/hang.c
index 9246e12455..bf56f4c662 100644
--- a/lib/hang.c
+++ b/lib/hang.c
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2013
* Andreas Bießmann <andreas@biessmann.org>
*
* This file consolidates all the different hang() functions implemented in
* u-boot.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/hashtable.c b/lib/hashtable.c
index f08847758a..52aab6df6e 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: LGPL-2.1+
/*
* This implementation is based on code from uClibc-0.9.30.3 but was
* modified and extended for use within U-Boot.
@@ -9,8 +10,6 @@
* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
* This file is part of the GNU C Library.
* Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1993.
- *
- * SPDX-License-Identifier: LGPL-2.1+
*/
#include <errno.h>
diff --git a/lib/initcall.c b/lib/initcall.c
index db7c558bde..8f1dac68e4 100644
--- a/lib/initcall.c
+++ b/lib/initcall.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013 The Chromium OS Authors.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/ldiv.c b/lib/ldiv.c
index 8e11333acd..5b1a25f281 100644
--- a/lib/ldiv.c
+++ b/lib/ldiv.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-
- * SPDX-License-Identifier: LGPL-2.0+
*/
typedef struct {
diff --git a/lib/libfdt/Makefile b/lib/libfdt/Makefile
index edd8e64ce0..ef5b6e29d4 100644
--- a/lib/libfdt/Makefile
+++ b/lib/libfdt/Makefile
@@ -1,9 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2000-2007
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
# Use upstream code.
obj-y += \
diff --git a/lib/lmb.c b/lib/lmb.c
index 031f0e1ac8..1705417348 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Procedures for maintaining information about logical memory blocks.
*
* Peter Bergner, IBM Corp. June 2001.
* Copyright (C) 2001 Peter Bergner.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/lzma/LzmaTools.c b/lib/lzma/LzmaTools.c
index f88629b74f..2537cb8f8c 100644
--- a/lib/lzma/LzmaTools.c
+++ b/lib/lzma/LzmaTools.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Usefuls routines based on the LzmaTest.c file from LZMA SDK 4.65
*
@@ -5,8 +6,6 @@
* Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com)
*
* Copyright (C) 1999-2005 Igor Pavlov
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
diff --git a/lib/lzma/LzmaTools.h b/lib/lzma/LzmaTools.h
index f8bdd1ffda..e52dfb8fac 100644
--- a/lib/lzma/LzmaTools.h
+++ b/lib/lzma/LzmaTools.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Usefuls routines based on the LzmaTest.c file from LZMA SDK 4.65
*
@@ -5,8 +6,6 @@
* Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com)
*
* Copyright (C) 1999-2005 Igor Pavlov
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __LZMA_TOOL_H__
diff --git a/lib/lzma/Makefile b/lib/lzma/Makefile
index b6c80671b9..c2fd3e4945 100644
--- a/lib/lzma/Makefile
+++ b/lib/lzma/Makefile
@@ -1,12 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (C) 2007-2008 Industrie Dial Face S.p.A.
# Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com)
#
# (C) Copyright 2003-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
ccflags-y += -D_LZMA_PROB32
diff --git a/lib/lzo/Makefile b/lib/lzo/Makefile
index 2936544abc..45612a83da 100644
--- a/lib/lzo/Makefile
+++ b/lib/lzo/Makefile
@@ -1,8 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2008
# Stefan Roese, DENX Software Engineering, sr@denx.de.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
obj-y += lzo1x_decompress.o
diff --git a/lib/membuff.c b/lib/membuff.c
index fc37757f0c..45dae2d576 100644
--- a/lib/membuff.c
+++ b/lib/membuff.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2015 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
*
* Copyright (c) 1992 Simon Glass
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/net_utils.c b/lib/net_utils.c
index d06be22849..9fb9d4a4b0 100644
--- a/lib/net_utils.c
+++ b/lib/net_utils.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Generic network code. Moved from net.c
*
@@ -6,8 +7,6 @@
* Copyright 2000 Paolo Scaffardi
* Copyright 2000-2002 Wolfgang Denk, wd@denx.de
* Copyright 2009 Dirk Behme, dirk.behme@googlemail.com
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/of_live.c b/lib/of_live.c
index e574ae8a39..c49e95e38c 100644
--- a/lib/of_live.c
+++ b/lib/of_live.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2009 Benjamin Herrenschmidt, IBM Corp
* benh@kernel.crashing.org
@@ -5,8 +6,6 @@
* Based on parts of drivers/of/fdt.c from Linux v4.9
* Modifications for U-Boot
* Copyright (c) 2017 Google, Inc
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/optee/Makefile b/lib/optee/Makefile
index 03e832f349..b692311864 100644
--- a/lib/optee/Makefile
+++ b/lib/optee/Makefile
@@ -1,7 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2017 Linaro
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
obj-$(CONFIG_OPTEE) += optee.o
diff --git a/lib/optee/optee.c b/lib/optee/optee.c
index 78a15e8a32..db92cd9af2 100644
--- a/lib/optee/optee.c
+++ b/lib/optee/optee.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2017 Linaro
* Bryan O'Donoghue <bryan.odonoghue@linaro.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/rand.c b/lib/rand.c
index 5c367e186f..af4cf3a0e8 100644
--- a/lib/rand.c
+++ b/lib/rand.c
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Simple xorshift PRNG
* see http://www.jstatsoft.org/v08/i14/paper
*
* Copyright (c) 2012 Michael Walle
* Michael Walle <michael@walle.cc>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/rbtree.c b/lib/rbtree.c
index 5de3bf4026..333314ad52 100644
--- a/lib/rbtree.c
+++ b/lib/rbtree.c
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
Red Black Trees
(C) 1999 Andrea Arcangeli <andrea@suse.de>
(C) 2002 David Woodhouse <dwmw2@infradead.org>
(C) 2012 Michel Lespinasse <walken@google.com>
- * SPDX-License-Identifier: GPL-2.0+
-
linux/lib/rbtree.c
*/
diff --git a/lib/rc4.c b/lib/rc4.c
index 89d15f3c82..0c00439843 100644
--- a/lib/rc4.c
+++ b/lib/rc4.c
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2015 Google, Inc
*
* (C) Copyright 2008-2014 Rockchip Electronics
*
* Rivest Cipher 4 (RC4) implementation
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef USE_HOSTCC
diff --git a/lib/rsa/Makefile b/lib/rsa/Makefile
index 4b2c1bae79..a51c6e1685 100644
--- a/lib/rsa/Makefile
+++ b/lib/rsa/Makefile
@@ -1,11 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (c) 2013, Google Inc.
#
# (C) Copyright 2000-2007
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
obj-$(CONFIG_$(SPL_)FIT_SIGNATURE) += rsa-verify.o rsa-checksum.o
obj-$(CONFIG_RSA_SOFTWARE_EXP) += rsa-mod-exp.o
diff --git a/lib/rsa/rsa-checksum.c b/lib/rsa/rsa-checksum.c
index 2bf28e2daf..e60debb7df 100644
--- a/lib/rsa/rsa-checksum.c
+++ b/lib/rsa/rsa-checksum.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013, Andreas Oetken.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef USE_HOSTCC
diff --git a/lib/rsa/rsa-mod-exp.c b/lib/rsa/rsa-mod-exp.c
index 9d78aa1ead..031c710dff 100644
--- a/lib/rsa/rsa-mod-exp.c
+++ b/lib/rsa/rsa-mod-exp.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013, Google Inc.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef USE_HOSTCC
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index 1da4ef7fff..d2788bf79a 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013, Google Inc.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include "mkimage.h"
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index 0d548f8b8f..bc83354378 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013, Google Inc.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef USE_HOSTCC
diff --git a/lib/sha1.c b/lib/sha1.c
index f54bb5be98..8154e1e135 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: LGPL-2.1
/*
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
* based on:
* FIPS-180-1 compliant SHA-1 implementation
*
* Copyright (C) 2003-2006 Christophe Devine
- *
- * SPDX-License-Identifier: LGPL-2.1
*/
/*
* The SHA-1 standard was published by NIST in 1993.
diff --git a/lib/sha256.c b/lib/sha256.c
index 7f5a3618d0..c1fe93de01 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* FIPS-180-2 compliant SHA-256 implementation
*
* Copyright (C) 2001-2003 Christophe Devine
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef USE_HOSTCC
diff --git a/lib/smbios.c b/lib/smbios.c
index 00b521eca9..df3d26b071 100644
--- a/lib/smbios.c
+++ b/lib/smbios.c
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
*
* Adapted from coreboot src/arch/x86/smbios.c
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/strmhz.c b/lib/strmhz.c
index 5c16cc4fc7..66afe91ab9 100644
--- a/lib/strmhz.c
+++ b/lib/strmhz.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2002-2006
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/tables_csum.c b/lib/tables_csum.c
index 340d7b3b11..e2630d57d9 100644
--- a/lib/tables_csum.c
+++ b/lib/tables_csum.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/time.c b/lib/time.c
index aed1a091f2..3bf678a232 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2000-2009
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index 5f7e27d76e..ebef92fc9f 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: LGPL-2.1+
/*
* Tiny printf version for SPL
*
@@ -5,8 +6,6 @@
* http://www.sparetimelabs.com/printfrevisited/printfrevisited.php
*
* Copyright (C) 2004,2008 Kustaa Nyholm
- *
- * SPDX-License-Identifier: LGPL-2.1+
*/
#include <common.h>
diff --git a/lib/tizen/Makefile b/lib/tizen/Makefile
index e1a9cf4547..3651ea21fb 100644
--- a/lib/tizen/Makefile
+++ b/lib/tizen/Makefile
@@ -1,8 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2012 Samsung Electronics
# Donghwa Lee <dh09.lee@samsung.com>
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
obj-$(CONFIG_TIZEN) += tizen.o
diff --git a/lib/tizen/tizen.c b/lib/tizen/tizen.c
index d207f77d0b..916b259756 100644
--- a/lib/tizen/tizen.c
+++ b/lib/tizen/tizen.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2012 Samsung Electronics
* Donghwa Lee <dh09.lee@samsung.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/tizen/tizen_logo_16bpp.h b/lib/tizen/tizen_logo_16bpp.h
index 0057c11f0b..12e86269c4 100644
--- a/lib/tizen/tizen_logo_16bpp.h
+++ b/lib/tizen/tizen_logo_16bpp.h
@@ -1,9 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2013 Samsung Electronics
* Przemyslaw Marczak <p.marczak@samsung.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
-*/
+ */
#ifndef __TIZEN_LOGO_16BPP__
#define __TIZEN_LOGO_16BPP__
diff --git a/lib/tizen/tizen_logo_16bpp_gzip.h b/lib/tizen/tizen_logo_16bpp_gzip.h
index b05498df4e..d8526f88a9 100644
--- a/lib/tizen/tizen_logo_16bpp_gzip.h
+++ b/lib/tizen/tizen_logo_16bpp_gzip.h
@@ -1,9 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2013 Samsung Electronics
* Przemyslaw Marczak <p.marczak@samsung.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
-*/
+ */
#ifndef __TIZEN_LOGO_16BPP_GZIP__
#define __TIZEN_LOGO_16BPP_GZIP__
diff --git a/lib/tpm.c b/lib/tpm.c
index c8bf06178f..bc9652d8e4 100644
--- a/lib/tpm.c
+++ b/lib/tpm.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013 The Chromium OS Authors.
* Coypright (c) 2013 Guntermann & Drunck GmbH
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/trace.c b/lib/trace.c
index ad5e07bd84..bb089c2eca 100644
--- a/lib/trace.c
+++ b/lib/trace.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2012 The Chromium OS Authors.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/uuid.c b/lib/uuid.c
index 1536c027da..5d5adf6b2d 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2011 Calxeda, Inc.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/lib/zlib/Makefile b/lib/zlib/Makefile
index 2fba95f438..4a3e985a94 100644
--- a/lib/zlib/Makefile
+++ b/lib/zlib/Makefile
@@ -1,8 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2000-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
obj-y += zlib.o